Use immutable data structures for applab screen reducer#8585
Conversation
|
|
||
| if (state.screens.currentScreenId !== lastState.screens.currentScreenId) { | ||
| renderScreens(state.screens.currentScreenId); | ||
| if (!lastState || |
There was a problem hiding this comment.
One option that might help a tiny bit with scan-ability of these lines:
const screenChanged = [boolean logic];
if (screenChanged) {
(no strong feeling on this, though)
|
LGTM! |
|
Generally lgtm. Any thoughts on whether we could/should have a way of clearly indicating which reducers expose Immutable objects vs. JS objects? |
|
@Bjvanminnen perhaps a naming convention? I would say prefix everything with |
|
Another option (that I don't think I like) would be to put immutable reducers in their own subtree, i.e. It's also possible that we don't need to do anything here, and it will be reasonably clear just by looking at the reducer or other consumers of the reducer whether or not it's using Immutable. |
e2effed to
ea862d0
Compare
|
going to just leave this in my applab import branch |

cc @Bjvanminnen and @islemaster