Use React Navigation 407,918 directly in a Community CLI project, in an Expo 6,418 project that doesn't use Expo Router 6,418 , or when you maintain an existing app built on it. Install the container, the navigators you need, and the two native dependencies. In an Expo project, npx expo install picks the SDK's version of the native ones:
npx expo install @react-navigation/native @react-navigation/native-stack \
@react-navigation/bottom-tabs @react-navigation/drawer react-native-screens› Installing 1 SDK 57.0.0 compatible native module and 4 other packages using npm > npm install --save @react-navigation/native @react-navigation/native-stack @react-navigation/ bottom-tabs @react-navigation/drawer added 20 packages, and audited 523 packages in 16s
The native module was react-native-screens 3,732 , pinned by SDK 57 to 4.26.2 (npm 2,036 's latest is 4.28.0); safe-area context, Reanimated 11,010 and Gesture Handler 6,788 were already installed. The rebuild of the development build, with Expo Router's native code in it too, took 7 minutes 58 seconds.
In a Community CLI project, npm install the same packages plus react-native-safe-area-context 2,760 and run npx pod-install ios on a Mac (not run here). React Navigation's guide also has you set supportFragmentManager.fragmentFactory = RNScreensFragmentFactory() before super.onCreate() in MainActivity.kt, so Android can recreate the screens after it kills the app in the background. MAINACTIVITY_NOTE React Navigation 7 needs React Native 0.72 36,878 or later and TypeScript 5.0 or later.