title: React Native, Navigation: "Undefined is not an object"
body: <p>I'm trying to redirect my user when his login succeed but I got this error: "Undefined is not an object (evaluating '_this2.props.navigation')"</p>
  
  <p>This is my code in App.js:</p>
  
  <pre><code>const Homepage = StackNavigator({
   Home: {screen: Home},
   Store: {screen: Store},
   Admin: {screen: Admin},
  });
  </code></pre>
  
  <p>This is my code in Store.js where I try to redirect the user once he logged in:</p>
  
  <pre><code>&lt;Button style={{color:'gray', borderColor: 'gray'}} onPress={() =&gt; 
  this.login()} title="Me connecter" /&gt;
  
  login(){
      firebase.auth().signInWithEmailAndPassword(this.state.emailLogin, 
      this.state.passwordLogin).then(function(user) {
          // Send the user to the next step
          setTimeout(() =&gt; {
              const { navigate } = this.props.navigation; 
              navigate('Admin');
          }, 1500);
      }).catch(function(error) {
          console.log('error');
          var errorCode = error.code;
          var errorMessage = error.message;
  
          if (errorCode === 'auth/wrong-password') {
              alert('Wrong password.');
          } else {
              alert(errorMessage);         
          }
          console.log(error);
      });
  }
  </code></pre>
  
  <p>Thanks in advance for your time and your precious answers.</p>