-
Create a Stack Navigator in
src/exercice/02/PublicNavigator.tsxthat shows theLoginScreenand theTermsScreen. You can read the official documentation https://reactnavigation.org/docs/stack-navigator/ -
Use
LOGIN_SCREENandTOC_SCREENas route names to maintain consistency when navigating -
Update the entry point of your application. Wrap your
PublicStackwithNavigationContainerusing 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}