Search code examples
statefluxredux

flux vs redux pros and cons highlights


I'm new to flux/redux data flow, and I try to understand the main differences between them.

Can you please highlight the differences? Such as pros and cons for each one?

Thanks


Solution

  • The shortest, simplest answer is Flux has multiple stores and a central dispatcher to manage communication to those stores.

    Redux only has one store and encourages using simple reducer functions to interact with various properties on the store.

    This strategy makes it easy to reason about the overall state of your application (it's just one massive POJO) and allows for awesome devtools like time-travel debugging and hotswapping state.

    There's a more detailed explanation (that does a far better job of explaining) in the official docs.