Skip to content

Clear example with top-level Redux connect #260

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

Closed
adamski opened this issue Feb 27, 2016 · 2 comments
Closed

Clear example with top-level Redux connect #260

adamski opened this issue Feb 27, 2016 · 2 comments

Comments

@adamski
Copy link

adamski commented Feb 27, 2016

I'm struggling to work out how to access redux state from a connected component's props, using the top level method connecting it to the Router.
I'd like to avoid using multiple connects, as the Redux docs state:

Try to only do this for a top-level component, or route handlers

I'm refactoring some code using NavigatorIOS and was previously passing the necessary props using passProps. I can't see an equivalent - I guess that happens behind the scenes with connect? Or do I need to connect each Route's component?

@adamski
Copy link
Author

adamski commented Feb 27, 2016

Think I found some good advice on #56
Still would be good to have clearer example I think.

@aksonov
Copy link
Owner

aksonov commented Feb 29, 2016

Feel free to submit PR for improving documentation. Btw, there is quite large discussion at redux github about having only one connect for top-level component, and i don't agree with this sentence.

@aksonov aksonov closed this as completed Feb 29, 2016
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