title: ReactNative ERROR ,The action 'NAVIGATE' with payload was not handled by any navigator
body: <p>I am using ReactNative application,
  route.ts</p>
  <pre><code>import React from 'react';
  import {NavigationContainer} from '@react-navigation/native';
  import {createStackNavigator} from '@react-navigation/stack';
  import Login from './src/screens/Login';
  import Dashboard from './src/screens/Dashboard';
  import {navigationRef} from './src/RootNavigation';
  export const RootStack = createStackNavigator();
  const Home = () =&gt; {
    return (
      &lt;NavigationContainer ref={navigationRef}&gt;
        &lt;RootStack.Navigator initialRouteName={'Login'}&gt;
          &lt;RootStack.Screen name=&quot;Login&quot; component={Login} /&gt;
          &lt;RootStack.Screen name=&quot;Dashboard&quot; component={Dashboard} /&gt;
        &lt;/RootStack.Navigator&gt;
      &lt;/NavigationContainer&gt;
    );
  }
  export default Home;
  </code></pre>
  <p>RootNavigation.ts</p>
  <pre><code> import React from 'react';
  
  export const navigationRef: any = React.createRef();
  
  export function navigate(name: any, params: any) {
    navigationRef.current.navigate(name, params);
  }
  </code></pre>
  <p>Login.tsx</p>
  <pre><code>import * as Navigation from '../RootNavigation';
  loginAttempt = () =&gt; {
      if (
        this.state.username === this.props.userData.username &amp;&amp;
        this.state.password === this.props.userData.password
      ) {
        Navigation.navigate('Dashboard ', {});
      } else {
        Alert.alert('Please try again with correct username and password');
      }
    };
  </code></pre>
  <p>Here I am facing issues error while navigating from one screen to another screen;
  The action 'NAVIGATE' with payload {&quot;name&quot;:&quot;Dashboard &quot;,&quot;params&quot;:{}} was not handled by any navigator.</p>
  <p>Do you have a screen named 'Dashboard '?</p>
  <p>If you're trying to navigate to a screen in a nested navigator, see <a href="https://reactnavigation.org/docs/nesting-navigators#navigating-to-a-screen-in-a-nested-navigator" rel="nofollow noreferrer">https://reactnavigation.org/docs/nesting-navigators#navigating-to-a-screen-in-a-nested-navigator</a>.</p>