React Navigation

What you will learn

  • Add an auth flow

👨‍🚀 Exercise 4

  • Add an Authentication flow to your application

Example:

function App() {
  const [isSignedIn, setIsSignedIn] = useState(false);

  return (
    <NavigationContainer>
      {isSignedIn ? <RootNavigator /> : <AuthNavigator />}
    </NavigationContainer>
  );
}

You can read the documentation https://reactnavigation.org/docs/auth-flow Hint: For now you can emulate the token with a simple useState.

👽 Bonus