It would be helpful to either be able to get a copy of the next immutable state, or at least fetch what the next values will be... This would be helpful for calculating aggregations on new data in reducers...
case: 'ADD_USER':
next = immutable(state);
next.set(['path' ,'to', 'users', 'byId', user.id], user);
next.set(['path', 'to', 'users', 'aggregations', 'totalUsers', Object.keys(next.get(['path', 'to', 'users', 'byId'])).length);
return next.value();
Getting would be preferable or at least being able to call next.value() then a set then another next.value() if I need to, but I get an error that I can't set after calling value:
Error: Cannot call set after `value`
It would be helpful to either be able to get a copy of the next immutable state, or at least fetch what the next values will be... This would be helpful for calculating aggregations on new data in reducers...
Getting would be preferable or at least being able to call
next.value()then asetthen anothernext.value()if I need to, but I get an error that I can't set after calling value: