title: The action 'NAVIGATE' with payload {"name":"Home","params":{} was not handled by any navigator
body: <p>Current Behavior
  The app should redirect the user after loggin in or singin up to the homepage, but it throws this error instead</p>
  <p>App.js :</p>
  <pre><code>import 'react-native-gesture-handler';
  import React, { useEffect, useState } from 'react'
  import { NavigationContainer } from '@react-navigation/native';
  import { createStackNavigator } from '@react-navigation/stack'
  import { LoginScreen, HomeScreen, RegistrationScreen } from './src/screens'
  import {decode, encode} from 'base-64'
  if (!global.btoa) { global.btoa = encode }
  if (!global.atob) { global.atob = decode }
  const Stack = createStackNavigator();
  
  export default function App() {
  
  const [loading, setLoading] = useState(true)
  const [user, setUser] = useState(null)
  
  return (
  
  &lt;Stack.Navigator&gt;
  { user ? (
  &lt;Stack.Screen name=&quot;Home&quot;&gt;
  {props =&gt; &lt;HomeScreen {...props} extraData={user} /&gt;}
  &lt;/Stack.Screen&gt;
  ) : (
  &lt;&gt;
  &lt;Stack.Screen name=&quot;Login&quot; component={LoginScreen} /&gt;
  &lt;Stack.Screen name=&quot;Registration&quot; component={RegistrationScreen} /&gt;
  &lt;/&gt;
  )}
  &lt;/Stack.Navigator&gt;
  
  );
  }
  </code></pre>
  <p>Login.js</p>
  <pre><code>. . .
  const onLoginPress = () =&gt; {
  firebase
  .auth()
  .signInWithEmailAndPassword(email, password)
  .then((response) =&gt; {
  const uid = response.user.uid
  const usersRef = firebase.firestore().collection('users')
  usersRef
  .doc(uid)
  .get()
  .then(firestoreDocument =&gt; {
  if (!firestoreDocument.exists) {
  alert(&quot;User does not exist anymore.&quot;)
  return;
  }
  const user = firestoreDocument.data()
  navigation.navigate('Home', {user})
  })
  .catch(error =&gt; {
  alert(error)
  });
  })
  .catch(error =&gt; {
  alert(error)
  })
  }
  . . .
  </code></pre>
  <p>Register.js</p>
  <pre><code>  const onRegisterPress = () =&gt; {
      if (password !== confirmPassword) {
          alert(&quot;Passwords don't match.&quot;)
          return
      }
      firebase
          .auth()
          .createUserWithEmailAndPassword(email, password)
          .then((response) =&gt; {
              const uid = response.user.uid
              const data = {
                  id: uid,
                  email,
  
              
  
  fullName,
              };
              const usersRef = firebase.firestore().collection('users')
              usersRef
                  .doc(uid)
                  .set(data)
                  .then(() =&gt; {
                      navigation.navigate('Home', {user: data})
                  })
                  .catch((error) =&gt; {
                      alert(error)
                  });
          })
          .catch((error) =&gt; {
              alert(error)
      });
  }
  </code></pre>
  <p>The error is cuased by this line in App.js:</p>
  <pre><code>{ user ? (
  &lt;Stack.Screen name=&quot;Home&quot;&gt;
  `   `{props =&gt; &lt;HomeScreen {...props} extraData={user} /&gt;}
  &lt;/Stack.Screen&gt;
  ) : (
  </code></pre>
  <p>**using these versions:
  &quot;@react-navigation/native&quot;: &quot;^5.8.10&quot;,
  &quot;@react-navigation/stack&quot;: &quot;^5.12.7&quot;,
  **I updated &quot;@react-navigation/stack&quot; to 5.12.8
  still same erorr</p>
  <pre><code>before it throws the error it gives me this warning
  &quot;Setting a timer for a long period of time&quot;**
  </code></pre>