title: How to pass value for example Login Data into Profle in react navigation 5?
body: <p>I have trouble passing value such username value and other data into profile screen in react navigation. Let say i have Login page &amp; profile page like this.</p>
  
  <p>Login.js</p>
  
  <pre><code>export default class LoginScreen extends Component {
  constructor(props) {
      super(props)
      this.state = {
          username: '',
          password: ''
      }
  }
  
  _login = async () =&gt; {
      if (userInfo.username == this.state.username &amp;&amp; userInfo.password == this.state.password) {
          await AsyncStorage.setItem('isLoggedIn', '1');
          this.props.navigation.navigate('HomeApp',{
              Username: 'Deni'
          });
      } else {
          alert('Password kamu salah')
      }
  }
  ....
  </code></pre>
  
  <p>And Profile.js how to get the data. I have tried getParam, this.props.navigation.getParams none of them works or thrown error. Please help thanks</p>
  
  <p>I have tried using this method in react navigation example.. but still failed. its said route is not defined or params is not defined.</p>
  
  <pre><code>const { itemId } = route.params;
    const { otherParam } = route.params;
    return (
      &lt;View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}&gt;
        &lt;Text&gt;Details Screen&lt;/Text&gt;
        &lt;Text&gt;itemId: {JSON.stringify(itemId)}&lt;/Text&gt;
        &lt;Text&gt;otherParam: {JSON.stringify(otherParam)}&lt;/Text&gt;
        &lt;Button
          title="Go to Details... again"
          onPress={() =&gt;
            navigation.push('Details', {
              itemId: Math.floor(Math.random() * 100),
            })
  </code></pre>