Theoretically, it seems you end up with sCUs that check the values you care about, or you have multiple stores you listen to.
-
-
Replying to @ryanflorence @dmnd_
sCU is a shell game. Since it needs to know something about all of your descendents, any strategy that wormholes breaks encapsulation.
1 reply 0 retweets 2 likes -
Redux works because it knows about all data changes. Introduce any side channel and you break its sCU. Flux doesn't work because 1/
1 reply 0 retweets 1 like -
there's no way to teach an ancestor sCU about the days dependency. 2/2
1 reply 0 retweets 1 like -
I’m a bit confused about this conversation. I haven’t seen people implement sCU by hand except corner cases. Use shallow checks instead.
2 replies 0 retweets 8 likes -
I'm also confused
@wycats. sCU pairs well with prop passing (and immutability ofc). But if you wormhole, subscribe at the destination.1 reply 0 retweets 0 likes -
But the the ancestor sCU doesn't know about the descendent subscription.
2 replies 0 retweets 0 likes -
Redux (or Flux) doesn't rely on this. Each component is notified independently (and can bail out). Parents don't know about children.
1 reply 0 retweets 4 likes -
Replying to @dan_abramov @wycats and
In React sCU only defines what happens to specific component. It doesn't decide for the whole subtree if child has sideways subscription.
2 replies 0 retweets 3 likes -
Replying to @dan_abramov @wycats and
So sCU=false will prevent React reconciliation below due to the parent, but a child with sCU=true will reconcile anyway.
3 replies 0 retweets 2 likes
And of course https://facebook.github.io/react/docs/react-component.html#forceupdate …, the sCU equivalent of !important
-
-
Replying to @wycats @dan_abramov and
Maybe I'm missing the point of this thread? I only implement sCU where I need to be picky about performance, and have never used forceUpdate
0 replies 0 retweets 0 likesThanks. 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.