On Redux/Flux change event, each subscribed component independently tells React "I need an update". React remembers that.
-
-
Replying to @dan_abramov @wycats and
Then React reconciles from each of these entry points the normal way. So yes, lifecyles on intermediate components fire.
1 reply 0 retweets 0 likes -
Replying to @dan_abramov @wycats and
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.
2 replies 0 retweets 4 likes -
Has this changed or were people very confused before:https://www.bennadel.com/blog/2904-shouldcomponentupdate-will-short-circuit-an-entire-subtree-of-components-in-reactjs.htm …
2 replies 2 retweets 0 likes -
Replying to @wycats @dan_abramov and
1: For example the React docs also say: "Furthermore, React.PureComponent's shouldComponentUpdate() skips prop updates for the whole
1 reply 0 retweets 0 likes -
Replying to @wycats @dan_abramov and
2/2: component subtree. Make sure all the children components are also 'pure'"
1 reply 0 retweets 0 likes -
Let me try to explain it.. the important part is *who* calls setState.
2 replies 0 retweets 1 like -
Replying to @dan_abramov @wycats and
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.
1 reply 0 retweets 0 likes -
Replying to @dan_abramov @wycats and
Because setState can change props passed to children, which can change props of their children etc.
1 reply 0 retweets 0 likes -
Replying to @dan_abramov @wycats and
This is the case docs are talking about. sCU in any child can break the chain *started due to the (grand)parent update*.
2 replies 0 retweets 0 likes
But that isn't what the docs say. The docs say: "Make sure all the children components are also 'pure'" which means no side-channel inputs
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.