Skip to content

Instantly share code, notes, and snippets.

@animista01
Created October 24, 2017 02:54
Show Gist options
  • Select an option

  • Save animista01/bd414f969678f6e1ef136f0e1c0d3b23 to your computer and use it in GitHub Desktop.

Select an option

Save animista01/bd414f969678f6e1ef136f0e1c0d3b23 to your computer and use it in GitHub Desktop.
Immutable state tree
Dispatch actions
Pure fuctions don't modify the attributes that the recieve and also alway return the same value for the same params
Reducer: takes the previus state, the action to be dispatch and returns the next state.
Reducers change(But don't mutate it) properties in the store
action has a type
use payload as a convention for naming actions' values
Store: Manage states of the app. It also dispatch actions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment