title: React Navigation after login navigate problem
body: <p>I'm using useNavigation in React Navigation. After logging in with AsyncStorage, I want to redirect to the home page, but I cannot go back to the App function. When I want to go to HomePage, Navigate cannot find it and returns an error.</p>
  <p><strong>How can I trigger a function named app?</strong></p>
  <p>Navigate Error (console)</p>
  <blockquote>
  <p>The action 'NAVIGATE' with payload {&quot;name&quot;:&quot;HomeScreen&quot;} was not
  handled by any navigator</p>
  </blockquote>
  <p>Login Code</p>
  <pre><code>await AsyncStorage.setItem(&quot;userData&quot;, JSON.stringify(data.data));
  navigation.navigate('HomeScreen');
  </code></pre>
  <p>App.js</p>
  <pre><code>const App = () =&gt; {
    const [signedIn, setSignedIn] = useState([]);
  
    useEffect(() =&gt; {
      _checkUser();
    }, []);
  
    async function _checkUser(){
      let responseUser = await AsyncStorage.getItem(&quot;userData&quot;);
      setSignedIn(responseUser);
    }
  
    if(signedIn != null) {
      return (
        &lt;NavigationContainer&gt;
        &lt;Stack.Navigator screenOptions={{headerShown: false}}&gt;
          &lt;Stack.Screen name=&quot;HomeScreen&quot; component={_homeScreen} /&gt;
        &lt;/Stack.Navigator&gt;
      &lt;/NavigationContainer&gt;
      )
    } else {
      return (
        &lt;NavigationContainer&gt;
          &lt;Stack.Navigator screenOptions={{headerShown: false}}&gt;
            &lt;Stack.Screen name=&quot;WelcomeScreen&quot; component={_welcomeScreen} /&gt;
            &lt;Stack.Screen name=&quot;RegisterScreen&quot; component={_registerScreen} /&gt;
            &lt;Stack.Screen name=&quot;LoginScreen&quot; component={_loginScreen} /&gt;
            &lt;Stack.Screen name=&quot;ForgotScreen&quot; component={_forgotScreen} /&gt;
            &lt;Stack.Screen name=&quot;EmailCodeScreen&quot; component={_emailCodeScreen} /&gt;
          &lt;/Stack.Navigator&gt;
        &lt;/NavigationContainer&gt;
      )
    }
  }
  </code></pre>
  <p>When I try to do it with MOBX..</p>
  <pre><code>let signedIn = userStore.isLogin;
  
    return (
      &lt;NavigationContainer&gt;
        &lt;Stack.Navigator screenOptions={{headerShown: false}}&gt;
          {
            signedIn ? (
              &lt;Stack.Screen name=&quot;HomeScreen&quot; component={_homeScreen} /&gt;
            ) : (
              &lt;&gt;
                &lt;Stack.Screen name=&quot;WelcomeScreen&quot; component={_welcomeScreen} /&gt;
                &lt;Stack.Screen name=&quot;RegisterScreen&quot; component={_registerScreen} /&gt;
                &lt;Stack.Screen name=&quot;LoginScreen&quot; component={_loginScreen} /&gt;
                &lt;Stack.Screen name=&quot;ForgotScreen&quot; component={_forgotScreen} /&gt;
                &lt;Stack.Screen name=&quot;EmailCodeScreen&quot; component={_emailCodeScreen} /&gt;
              &lt;/&gt;
            )
          }
        &lt;/Stack.Navigator&gt;
      &lt;/NavigationContainer&gt;
    )
  </code></pre>
  <p>Router</p>
  <pre><code>let data = await axios.post(baseURL+&quot;users_checkMail&quot;, sendData);
  uaStore.userStore.userData = data.data;
  uaStore.userStore.isLogin = true;
  await AsyncStorage.setItem(&quot;userData&quot;, JSON.stringify(data.data));
  console.log(userStore.isLogin); // LOG: TRUE
  setLoader(false);
  navigation.navigate('HomeScreen');
  </code></pre>