redux-mock-store
redux-mock-store copied to clipboard
Add local reducer and method for change it
Sometimes we need to get store after use actions. Actually it's useful for testing containers. I found method replaceReducer, but it's not worked.
Method replaceReducer do nothing
replaceReducer (nextReducer) {
if (!isFunction(nextReducer)) {
throw new Error('Expected the nextReducer to be a function.')
}
}
I propose create local reducer and wrap state when get new action. InitialState is default value for reducer. This will make it convenient to receive a modified store.
See #145