Skip to content
This repository was archived by the owner on Jan 7, 2019. It is now read-only.

Update lock-device-orientation.mo.md #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions react-native/features/lock-device-orientation.mo.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Steps

- Follow [this](https://github.com/yamill/react-native-orientation/blob/master/README.md) to install react-native-orientation
- Follow [this](https://github.com/wonday/react-native-orientation-locker#installation) to install react-native-orientation-locker

> :warning: Do not forget to rebuild your app

Expand All @@ -17,16 +17,16 @@

We need to lock all the app pages, to do so import react-native-orientation in our top component:

`import Orientation from 'react-native-orientation`
`import Orientation from 'react-native-orientation-locker';`

Add those lines to lock the orientation:

```
```js
componentWillMount () {
Orientation.lockToPortrait()
}
```

- Refresh your app, and try to rotate your screen

- [Star the repo](https://github.com/yamill/react-native-orientation) if it works ;)
- [Star the repo](https://github.com/wonday/react-native-orientation-locker) if it works ;)