August 2017
Beginner
374 pages
10h 41m
English
Now all that's left to do is to import and inject the undo/redo action creators from the redux-undo library.
Edit src/containers/ConnectedCounter.jsx and take a look at the following import statement:
import { undo, redo } from '../undoable'
Now, replace it with this:
import { ActionCreators } from 'redux-undo'const { undo, redo } = ActionCreators
We have already injected the action creators using mapDispatchToProps earlier in this chapter:
const mapDispatchToProps = (dispatch, props) => bindActionCreators({ increment, decrement, reset, undo, redo }, dispatch)
Ensure that the highlighted code in the preceding code is present.
Read now
Unlock full access