title: React native navigation error -TypeError: Cannot read property 'catch' of undefined
body: <p>I rerouting user when proper data are loaded from Async Storage:</p>
  <pre><code>useEffect(() =&gt; {
          loadData(localStorageKeys.USER_LOGGED_IN, true)
              .then(isUserLoggedIn =&gt; {
                      if (isUserLoggedIn) {
                          props.navigation.navigate(NavigationLocations.DASHBOARD)
                              .catch(e =&gt; logNavigationError(e))
                      } else {
                          console.log(&quot;No user is signed in.&quot;);
                          console.log(AsyncStorage.getAllKeys());
                      }
                  }
              )
              .catch(e =&gt; {
                  console.error(&quot;Unable check locally if user is logged in.&quot;);
                  debugger
                  console.error(e);
              });
      }, []);
  </code></pre>
  <p>The routing works as intended, however I am getting this error:</p>
  <pre><code>index.js:1 Unable check locally if user is logged in.
  console.&lt;computed&gt; @ index.js:1
  (anonymous) @ Signup.js:32
  Promise.catch (async)
  (anonymous) @ Signup.js:29
  ...
  </code></pre>
  <p>Why is the error occuring even though the routing happens as intended?</p>