Question: What is the core difference of redux & reflux in using react based application?

Question

What is the core difference of redux & reflux in using react based application?

Answers 1
Added at 2016-03-31 08:03
Tags
Question

Recently i do a pre study on developing an E-commerce site and discover that redux and reflux ,both comes from flux architecture in facebook and both are popular.So i confused about there and not so much resource in internet, So my question is in which case use redux or reflux. And which should be comparatively flexible in development phase like this type of application???

Answers to

What is the core difference of redux & reflux in using react based application?

nr: #1 dodano: 2016-03-31 09:03

Flux, Reflux and Redux (and many other similar libraries) are all different ways to handle transversal data managemenent.

Basic React components work fine with father-children relationships, but when you have to provide and update data from different parts of the app which are not directly connected it can become quickly messy. Those libraries provide stores and actions (and other mecanism) to maintain and update such data.

Flux is the original solution developed by Facebook (just like React), it is powerful but probably not the easiest or readable. Reflux was developed partly to make it easier and clearer. The main difference is that in Reflux every piece of data has its own store and actions, which make it very readable and easy to write. Unfortunately Reflux is not so much actively developed anymore, the author is looking for maintainers. But all in all I would say Reflux is a more elegant alternative to Flux.

Redux is another solution, which has bcome the most popular so far. Its advatage is that it provide nested stores with immutable content so that you can easily implement previous/next feature and have transversal actions that have impact on many parts of the store. The disadvantages of redux are that it is quite verbose and has many more concepts than Flux or Reflux. FOr the same basic actions it will need much more code, and async is not the cleanest ever. But it is definitively powerful and scalable.

Here is a link that talks about it more extentively: http://jamesknelson.com/which-flux-implementation-should-i-use-with-react/

Source Show
◀ Wstecz