Skip to content
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

Pass values as props between views #2

Open
EzeInverni opened this issue May 12, 2018 · 3 comments
Open

Pass values as props between views #2

EzeInverni opened this issue May 12, 2018 · 3 comments

Comments

@EzeInverni
Copy link

Hi! I implemented this navigator to load three imported views and I want to know how to pass some values as props when I touch on the the tab button to change between them. If it helps, i'm also using react-native-router-flux in my project. Thanks!

@joaquindk
Copy link
Owner

Thanks for you feedback @EzeInverni . With the current version of the navigator this is not possible unless you use a 3rd party lib like Redux to do it. However I'll try to incorporate it into the navigator asap and let you know when it's done.

@EzeInverni
Copy link
Author

Hi, thanks for the reply! If anyone encounters the same problem, I 'solved' it by saving the values from a tab in AsyncStorage and then retrieving them in the other tab when componentWillReceiveProps() is called, wich happens everytime you press the buttons to swing between the tabs. A little bit too overkill but works for me.

@joaquindk
Copy link
Owner

Fair enough - I'll try to solve it using the new context api, which should provide a bit of a lighter solution. Will let you know when it's ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants