Skip to content

Instantly share code, notes, and snippets.

@poonia
Last active March 18, 2019 05:16
Show Gist options
  • Save poonia/0acee45dcb05735aa80c9a62d98391c1 to your computer and use it in GitHub Desktop.
Save poonia/0acee45dcb05735aa80c9a62d98391c1 to your computer and use it in GitHub Desktop.
Redux
Here is the simplest Flux flow:
1. Stores subscribe to a subset of actions.
2. An action is sent to the dispatcher.
3. The dispatcher notifies subscribed stores of the action.
4. Stores update their state based on the action.
5. The view updates according to the new state in the stores. 6. The next action can then be processed.
Redux
This simple example shows the base of Redux. We have a single store to control the state, actions to describe the changes
we want to make, reducers (services, in our example) that know how to mutate the state based on the requested action,
and middleware to handle the housekeeping tasks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment