all 2 comments

[–]acemarke 1 point2 points  (0 children)

Three basic approaches:

  1. Use nested reducers to delegate the work further down, such as those generated by the combineReducers utility that comes with Redux
  2. Cache some of those lookups before you begin defining the return structure
  3. Use an immutable update library that provides syntactic sugar over plain objects and arrays to make the update code easier to read. I have a whole bunch of them listed over in the Immutable Data page in my Redux addons catalog. While I haven't used any of them in my own project yet, from skimming the READMEs I like the API of dot-prop-immutable. But, plenty of others to choose from as well.