mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-24 04:25:34 +08:00
Document useScreens
This commit is contained in:
12
README.md
12
README.md
@@ -20,7 +20,17 @@ react-native link react-native-screens
|
||||
|
||||
> If you are not familiar with the concept of linking libraries [read on here](https://facebook.github.io/react-native/docs/linking-libraries-ios).
|
||||
|
||||
3. You are all set 🎉 – when native modules are properly linked react-navigation will automatically use them instead of relying on plain React Native Views.
|
||||
3. Enable screens support before any of your navigation screen renders. Add the following code to your main application file (e.g. App.js):
|
||||
```
|
||||
import { useScreens } from 'react-native-screens';
|
||||
|
||||
useScreens();
|
||||
```
|
||||
|
||||
Note that the above code need to execute before first render of a navigation screen. You can check Example's app [App.js](https://github.com/kmagiera/react-native-screens/blob/master/Example/App.js#L16) file as a reference.
|
||||
|
||||
|
||||
4. You are all set 🎉 – when screens are enabled in your application code react-navigation will automatically use them instead of relying on plain React Native Views.
|
||||
|
||||
## Guide for navigation library authors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user