diff --git a/packages/native-stack/README.md b/packages/native-stack/README.md index d07eca70..3a88f05c 100644 --- a/packages/native-stack/README.md +++ b/packages/native-stack/README.md @@ -2,7 +2,7 @@ Stack navigator for React Native using native primitives for navigation. Uses [`react-native-screens`](https://github.com/kmagiera/react-native-screens) under the hood. -Expo is currently not supported as it includes an older version of `react-native-screens`. +Expo SDK 35 and lower is not supported as it includes an older version of `react-native-screens`. ## Installation @@ -11,12 +11,30 @@ Open a Terminal in your project's folder and run, ```sh yarn add @react-navigation/native @react-navigation/native-stack ``` +Or with npm -Now we need to install [`react-native-screens`](https://github.com/kmagiera/react-native-screens). +```sh +npm install --save @react-navigation/native @react-navigation/native-stack +``` + +If you are using Expo, to ensure that you get the compatible versions of the libraries, run: + +```sh +expo install react-native-screens +``` + +If you are not using Expo, run the following: ```sh yarn add react-native-screens ``` +Or with npm + +```sh +npm install --save react-native-screens +``` + +If you are using Expo, you are done. Otherwise, continue to the next steps. To complete the linking on iOS, make sure you have [Cocoapods](https://cocoapods.org/) installed. Then run: @@ -36,9 +54,9 @@ implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02' Make sure to enable `react-native-screens`. This needs to be done before our app renders. To do it, add the following code in your entry file (e.g. `App.js`): ```js -import { useScreens } from 'react-native-screens'; +import { enableScreens } from 'react-native-screens'; -useScreens(); +enableScreens(); ``` ## Usage