Comment by fullstackchris
22 days ago
> a Redux action, which would update the global Redux store, which would cause all Redux-connected components on the page to update, which would cause all their children to update as well. In other words, collapsing one comment triggered an update for nearly every React component on the page. No amount of caching, DOM-diffing, or shouldComponentUpdate can save you from this amount of waste.
yeah this is pretty much 1. an incorrect implementation and/or 2. an incorrect take
and easily solvable with a bit of 'render auditing' / debugging
It's very easy to say the New Reddit devs were just "doing it wrong" and oversubscribing their components to Redux state, for example. (I love me a good `state => state` selector.) But also, this irrelevant-update problem was pervasive across all of New Reddit, across the app I worked on professionally for five years, and across many other applications I've looked at with the React and Redux dev tools. Irrelevant updates happen all the time with this stack.
If everyone who uses it seriously ends up "doing it wrong", I say it's the framework's fault.