-
Notifications
You must be signed in to change notification settings - Fork 298
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
Still return defaultState in handleActions reducer when no handlers are provided #203
Still return defaultState in handleActions reducer when no handlers are provided #203
Conversation
I think I misread #202 (comment). Why do you think an empty object is not an usage error? I'd have thought that we would be throwing an error (using |
First: It was possible in previous versions of redux-actions. So it was a breaking change for us. |
Thanks for the reply. We're on 2.0 now, that breaking change should have been noted. Though I'm not sure when this break occurred. I can't think of a use case in real apps. Could you give an example? |
You're right there is no "real" use case for that. However we often start new redux/react apps with an empty skeleton of different reducers and this breaks our skeletons now during development. |
I think defaulting to Can we do an invariant check in |
I update the PR with more tests and the invariant check. Hope the expected behaviour is better described now. Regarding #197 |
Thanks for the contribution! |
Fixes #202