I'm also confused @wycats. sCU pairs well with prop passing (and immutability ofc). But if you wormhole, subscribe at the destination.
-
-
1: For example the React docs also say: "Furthermore, React.PureComponent's shouldComponentUpdate() skips prop updates for the whole
-
2/2: component subtree. Make sure all the children components are also 'pure'"
-
Let me try to explain it.. the important part is *who* calls setState.
-
Let's forget about Flux for a minute and look at vanilla React. If you call setState at the top, anything below might need a redraw.
-
Because setState can change props passed to children, which can change props of their children etc.
-
This is the case docs are talking about. sCU in any child can break the chain *started due to the (grand)parent update*.
-
With Flux/Redux there's not one update, but many. One for each connected component. So it's many setState()s at different depths.
-
sCU can only short circuit *React's* top down walk. It can't prevent Redux from telling a grandchild personally that it needs change.
- 16 more replies
New conversation -
-
-
It's not confused. For edu need record of change to teach. As API gets complex don't want 100 meg apple only app
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.