React-Navigation go to same route with different params

You are looking for push instead of navigate. When you use navigate, it look for a route with that name, and if it exists navigate to it. When you use push, you go to a new route, adding a new navigation to the stack.

See the documentation here https://reactnavigation.org/docs/en/navigating.html#navigate-to-a-route-multiple-times

In your case, you should do:

NavigationActions.push({ routeName: 'User', params: {userId} }) 

or through your props (make sure your props has ‘navigation’):

this.props.navigation.push('User', {userId:'paramValue'})

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)