Created
December 8, 2017 13:03
-
-
Save vzaidman/3a82311d753f9c30afa177fb6e5cfedb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const state1 = countReducer(undefined, {TYPE: '@@redux/INIT'}) | |
// the initial state was set in defaultState and its value is 100 | |
// ⇒ state1 === 100 | |
const state2 = countReducer(state1, increaseBy(100)) | |
// ⇒ state2 === 200 | |
const state3 = countReducer(state2, increaseBy(-500)) | |
// ⇒ state3 === -300 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment