Closed aizulhussin closed 6 years ago
@aizulhussin , Nesting Navigator components is indeed creating problems with passing params. Found some issues in React Navigation related to this problem. Some of these include #80, #1251, #1237 I tried to find a workaround this. Navigating something like this helps us pass params successfully.
const navigationAction = NavigationActions.navigate({
routeName: "ProfileScreen", // <==== this is parent Profile tabNavigator
action: NavigationActions.navigate({
routeName: "Profile", // <===== this is default child Screen for Profile tabNavigator
params: { name: "JADE" }
})
});
this.props.navigation.dispatch(navigationAction);
However this appends two components for the same Profile screen on the navigation stack. Please add any other input that might help solve this. Thanks
Hi, i tried passing a parameter in LucyChat.js
However when i print the log in Profile.js, it gives undefined error
console.log("ID:",this.props.navigation.state.params.id);