Skip to content

Latest commit

 

History

History

flux-comparison

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Flux Comparison

Resources:

Flux Data Flow

flux data flow

See Flux introduction

Redux Data Flow

redux data flow

Comparison

flux-comparison

  • No Dispatcher
  • Single, Less Convoluted Store
  • Reducers

There are multiple frameworks/libraries that can be used to implement Flux. But Redux has distinguished itself as the one of the most populars.

Co-authored by dan Abramov and Andrew Clark in 2015, Redux aims to simplify and streamline many of the concepts introduced by Flux.

Redux and Flux are similar in that they both emphasize the importance of unidirectional data flow, and they both adjust state through actions with a similar interface (such as having a type field). However, they have some differences to note:

  • No Dispatcher: Redux has a single store, so there is only a single destination to broadcast new actions to, thus eliminating the need for a dispatcher.

  • A Single, Less Convoluted Store: All application's state is located within a centralized store which acts as the application's single source of truth. Additionally, the store's responsibilities have been reduced, it is now only responsible for containing the state, and is no longer in charge of determining how to adjust its state in response to actions. That logic has been delegated to reducers.

  • Reducers: Pure functions which accept the current state and a given action as arguments, and which output either the unmodified state or a new, edited copy of the state. Redux considers state to be immutable.