Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add local reducer and method for change it #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ananas7
Copy link

@ananas7 ananas7 commented Sep 12, 2018

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.

@jednano
Copy link

jednano commented Jul 12, 2019

See #145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants