-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Why is the reducer called three times? #729
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
Comments
|
The reason I started looking into this is that in another project of mine, the reducer is called two times for every action. I am not using function defaultReducer (state, action) {
return state;
}
function reducer (state, action) {
return {
data : defaultReducer(state.data, action),
ui: {
mainMenu: mainMenuReducer(state.ui.mainMenu, action)
}
}
} |
Please provide a runnable example to reproduce the issue, with expected and actual invocation count. |
I guess the question is: without using PS: Thanks a lot for Redux and for your time answering this questions. You rock! |
Reducer is called once on startup, and then once per every action. |
In the
counter
example, the reducer is called three times upon start.The same happens in
todomvc
example.Why is this?
Thanks!
I added:
The text was updated successfully, but these errors were encountered: