Need advice about which tool to choose?Ask the StackShare community!
Flux vs Redux: What are the differences?
Developers describe Flux as "Application Architecture for Building User Interfaces". Flux is the application architecture that Facebook uses for building client-side web applications. It complements React's composable view components by utilizing a unidirectional data flow. It's more of a pattern rather than a formal framework, and you can start using Flux immediately without a lot of new code. On the other hand, Redux is detailed as "Predictable state container for JavaScript apps". Redux helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger.
Flux belongs to "Javascript UI Libraries" category of the tech stack, while Redux can be primarily classified under "State Management Library".
"Unidirectional data flow" is the top reason why over 43 developers like Flux, while over 175 developers mention "State is predictable" as the leading cause for choosing Redux.
Flux and Redux are both open source tools. Redux with 49.5K GitHub stars and 12.8K forks on GitHub appears to be more popular than Flux with 16.2K GitHub stars and 3.62K GitHub forks.
According to the StackShare community, Redux has a broader approval, being mentioned in 1036 company stacks & 836 developers stacks; compared to Flux, which is listed in 67 company stacks and 29 developer stacks.
Pros of Flux
- Unidirectional data flow44
- Architecture32
- Structure and Data Flow19
- Not MVC14
- Open source12
- Created by facebook6
- A gestalt shift3
Pros of Redux
- State is predictable191
- Plays well with React and others149
- State stored in a single object tree125
- Hot reloading out of the box78
- Allows for time travel73
- You can log everything14
- Great tutorial direct from the creator11
- Endorsed by the creator of Flux6
- Test without browser6
- Easy to debug5
- Enforces one-way data flow2
- Granular updates2
- Blabla1
Sign up to add or upvote prosMake informed product decisions
Cons of Flux
Cons of Redux
- Lots of boilerplate12
- Verbose6
- Design5
- Steeper learning curve than RxJs4
- Steeper learning curve than MobX4
- Steep learning curve4