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.
2 replies 1 retweet 7 likes -
The idiomatic way to use redux is for every React component to subscribe to updates?
1 reply 0 retweets 1 like -
Not every, usually you mix those "entry points" with React's data flow. And those bail out for data that hasn't changed.
1 reply 0 retweets 0 likes -
Replying to @dan_abramov @wycats and
This is also a bit simplified because React usually batches multiple setState calls into one traversal. So it doesn't visit same nodes twice
1 reply 0 retweets 0 likes -
Replying to @dan_abramov @wycats and
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.
1 reply 1 retweet 3 likes -
Link?
1 reply 0 retweets 0 likes -
I'm afraid real implementation won't be helpful because it has a bunch of weird optimizations that obscure the idea
2 replies 0 retweets 1 like -
I'd be interested to see the pseudocode of the idea (something like the original "look, redux is so tiny")
1 reply 0 retweets 0 likes -
Just found that :Phttps://gist.github.com/gaearon/1d19088790e70ac32ea636c025ba424e …
3 replies 1 retweet 11 likes
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.