Working with Typescript
Last updated
Was this helpful?
Was this helpful?
import { StateWithHistory } from 'redux-undo'
createStore(rootReducer, {
// Have to cast to any first
undoableState: (initialState as any) as StateWithHistory<typeof initialState>
})createStore(rootReducer, {
undoableState: withHistory as StateWithHistory<typeof withHistory['present']>
})