3 ms·
The caveat here is that with flux/redux, I'd argue "make as few components as reasonably possible interact with redux" is a best practice. If "things popping ou
by jowiar 10y ago
The caveat here is that with flux/redux, I'd argue "make as few components as reasonably possible interact with redux" is a best practice. If "things popping out of nowhere" is a problem, you probably have too many components listening on your stores.
- acemarke 10y agoThat was actually the early advice for how to use Redux, but experience has shown that leads to less than optimal performance. In fact, benchmarks show that _more_ connected components usually leads to better perf, as the cost of notifying more subscribers is less than the cost of more wasted re-renders. See the following links for more info: - http://blog.isquaredsoftware.com/2017/01/practical-redux-part-6-connected-lists-forms-and-performance/ http://blog.isquaredsoftware.com/2017/01/practical-redux-par... - http://redux.js.org/docs/faq/Performance.html#performance-scaling http://redux.js.org/docs/faq/Performance.html#performance-sc... - http://somebody32.github.io/high-performance-redux/ http://somebody32.github.io/high-performance-redux/