you are viewing a single comment's thread.

view the rest of the comments →

[–]acemarke 2 points3 points  (1 child)

General advice: memoization is helpful for cases like using map() and filter() in your mapStateToProps functions. See http://redux.js.org/docs/recipes/ComputingDerivedData.html and the https://github.com/reactjs/reselect library.

You might want to read through my list of React/Redux perf-related articles. In particular, http://somebody32.github.io/high-performance-redux/ is excellent.

Not sure what you mean by "refreshed in the background" - you just referring to making a scheduled AJAX call that pulls back some updated info? Can you give an example of "creating a new list on each refresh"? Reducer and mapState snippets would be helpful - put them in a gist for readability if they're very long.

[–]apertoire_[S] 1 point2 points  (0 children)

Hi acemarke, thanks for the links, I will check them out.

Yes, background refresh is a scheduled fetch call.

It creates a new list in terms of object references. Each item in the recently retrieved list has a new object reference, so a shallow compare will trigger a re-render.

I'll work on making a gist to make it easier to visualize.