TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Redux Performance Tips

1 pointsby bloomcaover 2 years ago

1 comment

acemarkeover 2 years ago
Hi, I&#x27;m a Redux maintainer. This is a good post, but I&#x27;m a bit surprised it doesn&#x27;t talk about memoized selector functions at all. We specifically teach those as a way to improve performance, by avoiding costly transformations and consistently returning the same result reference until the inputs change:<p>- <a href="https:&#x2F;&#x2F;redux.js.org&#x2F;tutorials&#x2F;essentials&#x2F;part-6-performance-normalization#improving-render-performance" rel="nofollow">https:&#x2F;&#x2F;redux.js.org&#x2F;tutorials&#x2F;essentials&#x2F;part-6-performance...</a><p>- <a href="https:&#x2F;&#x2F;redux.js.org&#x2F;tutorials&#x2F;fundamentals&#x2F;part-7-standard-patterns#memoized-selectors" rel="nofollow">https:&#x2F;&#x2F;redux.js.org&#x2F;tutorials&#x2F;fundamentals&#x2F;part-7-standard-...</a><p>- <a href="https:&#x2F;&#x2F;redux.js.org&#x2F;usage&#x2F;deriving-data-selectors" rel="nofollow">https:&#x2F;&#x2F;redux.js.org&#x2F;usage&#x2F;deriving-data-selectors</a><p>Use of `React.memo()` also helps in cases like the large list, especially if you&#x27;re only passing down the item ID as props to the list item components and letting them select their own data based on that ID.<p>Also, as of Reselect 4.1, there are some additional options built into `createSelector` for doing comparisons, such as an option that can do a shallow equality check on the _new_ result, and stick with the _old_ result if they&#x27;re the same:<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;reduxjs&#x2F;reselect#defaultmemoizefunc-equalitycheckoroptions--defaultequalitycheck">https:&#x2F;&#x2F;github.com&#x2F;reduxjs&#x2F;reselect#defaultmemoizefunc-equal...</a>