Skip to content

Instantly share code, notes, and snippets.

@flexbox
Last active October 25, 2020 13:39
Show Gist options
  • Save flexbox/417f0efcd085e79667491d7ad6c3dc2e to your computer and use it in GitHub Desktop.
Save flexbox/417f0efcd085e79667491d7ad6c3dc2e to your computer and use it in GitHub Desktop.

🤸‍♀️ Exercise 1

  • Create a Stack Navigator in src/exercice/02/PublicNavigator.tsx that shows the LoginScreen and the TermsScreen. You can read the official documentation https://reactnavigation.org/docs/stack-navigator/

  • Use LOGIN_SCREEN and TOC_SCREEN as route names to maintain consistency when navigating

  • Update the entry point of your application. Wrap your PublicStack with NavigationContainer using the Stack Navigator from src/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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment