redux-mock-store icon indicating copy to clipboard operation
redux-mock-store copied to clipboard

Add local reducer and method for change it

Open ananas7 opened this issue 7 years ago • 1 comments

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.

ananas7 avatar Sep 12 '18 14:09 ananas7

See #145

jednano avatar Jul 12 '19 19:07 jednano