-
Notifications
You must be signed in to change notification settings - Fork 149
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
replaceReducer() does nothing. #145
Comments
I'm throwing an error when |
Why is there a refusal to allow this library to use a reducer as is? |
Any progress on that? |
all
🤔 ...i found it useful to create a mini-redux like this. const initialState = { slice: [{}] }
let currentState = initialState;
const mockStore = configureStore([middleware])(actions => {
const action = actions[actions.length - 1];
currentState = { ...currentState, slice: sliceReducer(currentState.slice, action) };
return currentState;
}); |
When
replaceReducer(someReducerFunction)
is run, nothing is set in the mock store. Also, mock stores don't actually have a reducer to begin with.The text was updated successfully, but these errors were encountered: