News for hackers. Stuff that matters.
Re:Build Yourself a Redux by msoad on Friday May 05, 2017 @02:53PM (#14275901)
There is no immutable state, at best we have immutable data. Benefit of immutable data is you can inspect two different states when state transitions from state A to state B. You get time travel and all that with this basic concept.

MobX makes it very easy to do that inspection between states.

Don't look at mutable state as evil. Redux state is mutable too.

Re:Build Yourself a Redux by cel1ne on Friday May 05, 2017 @04:13PM (#14276494)
In my opinion mutable state is most often better than immutable state. In JavaScript, that is, I have a different opinion on the JVM.

The important point is that the state is _serializable_, meaning it doesn't contain side-effects. That also means NetworkRequests must be replayable.

If your state is serializable, you get immutability out of the box by serializing everthing to JSON and back again.