New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Navigator config to pass params down #68
Comments
For more info (if needed), this came about because I needed to pass params down from a tab navigator to a child stack navigator. Here's a link to the stack overflow, which has a link to a snack demo. Thanks for the work around, @ericvicenti ! |
This was referenced Mar 5, 2019
richeterre
added a commit
to richeterre/jumu-app
that referenced
this issue
Jul 30, 2019
Instead of passing the selected contest as a nav param to the nested navigation structure (tab + stack navigators), which is tricky because params don't propagate to child navigators (see react-navigation/rfcs#43 and react-navigation/rfcs#68), we wrap the navigator structure with a ContestNavigator that receives the current contest as a prop, and passes it forward to its navigation screens as a param. The RootView component tracks the current contest and renders either a ContestNavigator or (if no contest selected) a contest picker.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was chatting with @geirman and I think we may want to add
passParams
to the navigator config:Say you go from Main
.navigate('MyTabs', {foo: 'bar'})
.. Thanks to the proposedpassParams
, screens A and B would have access to the "foo" param.I'll try to get to this in the coming weeks. Let me know if anybody wants to take a stab at implementing this.. I'd be happy to support you.
cc @brentvatne
The text was updated successfully, but these errors were encountered: