Issue
I am in a situation where I need to navigate from a child of StackNavigator
. How is this typically achieved? Does the this.props.navigation.navigate
have to be passed down as props or is there another way to do it? Something along the lines of React Router's withRouter
HOC?
Solution
The navigation prop is only available for the navigation-aware components which are the 'screen's. You can pass the navigation object down to child components as props or you can add the child component as a screen to the StackNavigator.
Answered By - nidaorhan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.