So when your top-level reducer returns a new atom, Redux walks the entire object and calls setState on components? Surprised if so.
-
-
When you want to subscribe a component to Redux, you wrap it with connect().https://gist.github.com/gaearon/1d19088790e70ac32ea636c025ba424e#file-connect-js-L48 …
-
Is there a more involved example I can look at?
-
Tree view where every node is connected https://github.com/reactjs/redux/blob/4d0d97b0f414ea7d9b8c1cd87a2ac3450dda61b6/examples/tree-view/src/containers/Node.js#L66-L70 …
-
Do people normally flatten their Redux stores this way so they can index by id or type/id?
-
Yep, it's called "normalization". See http://redux.js.org/docs/recipes/reducers/NormalizingStateShape.html … and http://blog.isquaredsoftware.com/2017/01/practical-redux-part-6-connected-lists-forms-and-performance/ … for examples and more info.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.