But even if sCU of a parent says "don't update me" React will still look at subscribe children because they independently asked for update.
So when your top-level reducer returns a new atom, Redux walks the entire object and calls setState on components? Surprised if so.
-
-
Technically Redux just calls a list of callback listeners. It's like an emitter with one event.
-
The idiomatic way to use redux is for every React component to subscribe to updates?
-
Not every, usually you mix those "entry points" with React's data flow. And those bail out for data that hasn't changed.
-
This is also a bit simplified because React usually batches multiple setState calls into one traversal. So it doesn't visit same nodes twice
-
Redux has one atom at the top. React Redux bindings subscribe components to changes to it and setState them with the data they care about.
-
I'm afraid real implementation won't be helpful because it has a bunch of weird optimizations that obscure the idea
-
I'd be interested to see the pseudocode of the idea (something like the original "look, redux is so tiny")
- 7 more replies
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.