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

Refactor redux containers #51

Closed
Ligerx opened this issue May 22, 2019 · 1 comment · Fixed by #58
Closed

Refactor redux containers #51

Ligerx opened this issue May 22, 2019 · 1 comment · Fixed by #58

Comments

@Ligerx
Copy link
Owner

Ligerx commented May 22, 2019

related to #50

Originally I based the redux top level connection from this article https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0

Unfortunately it seems that this has not stood the test of time. Hoping to move towards a model where components are responsible for getting their own data. Basically, once a parent component needs to know something about it's child that it doesn't already know, connect the child component up to redux.

Supporting articles
reduxjs/redux#1751 (comment)
https://stackoverflow.com/questions/37264415/how-to-optimize-small-updates-to-props-of-nested-component-in-react-redux/37266130#37266130
https://redux.js.org/faq/react-redux#should-i-only-connect-my-top-component-or-can-i-connect-multiple-components-in-my-tree

If a component that's connected to the store needs to have an ID passed down to it, refer to this pattern
reduxjs/redux#1603

@Ligerx
Copy link
Owner Author

Ligerx commented May 28, 2019

If a component that's connected to the store needs to have an ID passed down to it, refer to this pattern
reduxjs/redux#1603

Regarding this statement, if we start using reselect, this could get kind of annoying. Refer to #53

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

Successfully merging a pull request may close this issue.

1 participant