DEV Community

Dan L.
Dan L.

Posted on • Edited on

Redux vs Facebook Flux in React projects

It's always interesting to see how many libraries are out there that set up to do the very same thing.
That's usually because different providers set out to the same goal but due to company/political reasons don't arrive to merge/integrate.

One example of that is Facebook's Flux and Dan Abramov's Redux. It was interesting to see how similar these are. Only to realize the above statement later on, after reading this post:

https://stackoverflow.com/a/32920459

To me, Redux is a clear way to go and maybe would only still use Flux in experimental projects. As time is usually short and with hundreds of new frameworks out there, my approach is to just keep it simple and concentrate on the outcome.

Another issue with Redux and alikes is the boilerplate code generated. This can be fixed to some level:

https://redux.js.org/recipes/reducing-boilerplate

What is explained in reducing-boilerplate above, is very close to DSL(think how Terraform is configured) as for each reducer, you'd only write configuration. The logic is hidden under the template method, which is very nice.

Top comments (0)