Info. about reducers (#20642)

This commit is contained in:
Vishesh
2018-10-31 19:07:43 -04:00
committed by Tom
parent 82daab2dcc
commit ea7ab5e2dc

View File

@ -5,6 +5,10 @@ title: Reducers
Reducers are the pure functions that take an action and an previous state and return new state. Given the same input, the reducer should always return the same output.<sup>1</sup>
In a simple sense, reducers are gatekeepers of the redux central store.
- Components subscribe to the central data store which gets passed via props
- In order to make changes to the data store, components dispatch actions (along with optional payload)
- These actions gets passed onto reducers which then update the redux data store
### Sources
1. http://redux.js.org/docs/basics/Reducers.html