-
Create a Stack Navigator in
src/exercice/02/PublicNavigator.tsx
that shows theLoginScreen
and theTermsScreen
. You can read the official documentation https://reactnavigation.org/docs/stack-navigator/ -
Use
LOGIN_SCREEN
andTOC_SCREEN
as route names to maintain consistency when navigating -
Update the entry point of your application. Wrap your
PublicStack
withNavigationContainer
using the Stack Navigator fromsrc/final/02/PublicNavigator.tsx
.
Hint: If you are lost you can debug the changes on the NavigationContainer
with onStateChange={state => console.log('New state is', state)}
- Add some options to the Navigator
headerMode={'none'}
mode={'modal'}
initialRouteName={LOGIN_SCREEN}