
I didn't “get” Redux, so I rewrote it, and this is what I learned - dclowd9901
https://medium.com/@davedrew/lets-write-redux-975609b0358f#.n3hwt3id5
======
yanilkr
Redux is a cool idea but what is it doing in my browser?

Javascript in browser is a single threaded environment. Immutability of data
is a great concept in a context of concurrency but is an anti-pattern in
browser code.

Create a global variable to store your entire global state of your
application. g = {};

Use an observer pattern and create an event bus for all application entities
to talk to each other. You get a simple alternative to Redux pattern.

Redux is a cool name though. Like an intern who works here said, its great to
have on your resume but he does not know why its useful or what problem it
solves.

~~~
dclowd9901
Hm, that's an interesting question. The value I find in the immutability
aspect comes from, I think, _everything else_ that comes with it. In being
immutable, an action taken has to be explicit, and therefore is trackable and
replayable. So while you don't necessarily get much in the way of safety
against concurrency (though, let's be honest: there is still asynchronicity in
JS even without concurrency), you get a lot of free in terms of state
tracking, state replication and state reproduction. This doesn't even mention
the benefits around testing and reasoning about pure functions that are
reducers.

