August 2017
Beginner
374 pages
10h 41m
English
Now all that's left to do is handling the undo/redo actions:
import { INCREMENT, DECREMENT, RESET, UNDO, REDO } from '../actionTypes'
case UNDO:
return { ...state,
currentState: currentState <= 0 ? currentState : currentState - 1 }
case REDO: return { ...state, currentState: currentState >= history.length - 1 ? currentState ...Read now
Unlock full access