This project uses react-navigation for navigating in the app. Out of the box, navigation consists of a few main concepts.
This navigator is rendered at the root of the app. It is a SwitchNavigator and has 1 main responsibility: to take a currentUser
object and render either an Main Nav or a Guest Nav StackNavigator.
This nav is a StackNavigator that renders when a user is logged out of your app. Guest Nav screens typically consist of:
- Onboarding
- Registration
- Login
- Forgot Password
This nav is a StackNavigator that contains only the Main Nav by default. If you have any full screen modals that should render above the main nav UI, you should put them here.
Main Nav is meant to be the main interface of the app. By default it renders a BottomTabNavigator.
This nav is a StackNavigator that is meant to handle onboarding. We keep it as a separate stack from the Guest Nav. If your app doesn't need onboarding, feel free to delete this nav.