The Expo Router Link component is a wrapper around the React Navigation Link component. It is used to navigate to a route using a declarative API.
📄️ Navigation Container
The global React Navigation ` is completely managed by Expo Router. Expo Router provides systems for achieving the same functionality as the NavigationContainer` without needing to use it directly.
📄️ Native Stack
The Stack Layout in Expo Router wraps the Native Stack Navigator from React Navigation, not to be confused with the legacy JS Stack Navigator.
📄️ Moving between screens
Ports the guide React Navigation: Navigating to Expo Router.
📄️ Passing parameters to the routes
Ports the guide React Navigation: Params to Expo Router.
📄️ Custom navigators
You can create your own custom navigators with the Navigator component.
📄️ Drawer navigation
To use the React Navigation drawer navigator with Expo Router, do the following:
To use drawer navigator you'll need to install some extra dependencies.
📄️ Navigation State
Use routes instead of the navigation state.
📄️ Screen tracking for analytics
Unlike React Navigation, Expo Router always has access to a URL. This means screen tracking is as easy as the web.
Qualified layouts, like the ones found in expo-router (Stack, Tabs, Navigator) have a static Screen component which can be used to configure the behavior of a route declaratively.
The Stack Layout in Expo Router wraps the Native Stack Navigator from React Navigation, if you want to use the legacy JS Stack Navigator then do the following.
In React Navigation, you set the theme for the entire app using the ` component. Expo Router manages the root container for you, so instead you should set the theme using the ThemeProvider` directly.
Do not use the useLinkTo hook from React Navigation, instead use the useRouter hook from Expo Router.
Expo Router exports a custom useNavigation hook that optionally accepts a relative route fragment to access any parent navigation prop.
Do not use the useRoute hook from React Navigation, instead use the following hooks: