title: Conditional navigation is not working after reload in react native
body: <p>I have implemented conditional navigation, which is an alternative to switch navigation in react-navigation 5.</p>
  <pre><code> &lt;Stack.Navigator
        screenOptions={{
          headerTintColor: '#fff',
          headerTitleStyle: {
            fontFamily: 'SFUIDisplay-Regular.otf',
            fontWeight: 'bold',
          },
          headerStyle: {
            backgroundColor: '#3e94f0',
          },
          headerTitleAlign: 'center',
        }}
        initialRouteName=&quot;login&quot;&gt;
        {loginState || isTokenExists ? (
          &lt;Stack.Screen
            name=&quot;taskmanager&quot;
            component={Main}
            options={{
              title: 'Task Manager',
              cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
            }}
          /&gt;
        ) : (
          &lt;&gt;
            &lt;Stack.Screen
              name=&quot;login&quot;
              component={Login}
              options={{
                title: 'Sign In',
              }}
            /&gt;
            &lt;Stack.Screen
              name=&quot;register&quot;
              component={Register}
              options={{
                title: 'Register',
                cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
              }}
            /&gt;
            &lt;Stack.Screen
              name=&quot;forgetpassword&quot;
              component={ForgetPassword}
              options={{
                title: 'Forgot Password',
                cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS,
              }}
            /&gt;
          &lt;/&gt;
        )}
      &lt;/Stack.Navigator&gt;
  </code></pre>
  <p>On logout, the loginStatus is setting false, and the token is cleared. I have taken uid as token</p>
  <pre><code> //logout handler
    const logoutHandler = () =&gt; {
      console.log('AT logoutHandler', status);
      storeData('clearUID');
      dispatch(actions.loginStatus('', false));
      lowerOptionsToggle();
    };
  </code></pre>
  <p>Now the problem is logout functionality is working fine but if I'm reloading the app while the user is logged in, it's not logging out means the conditional navigation is not working.</p>