Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment