-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
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 sanity check for accidentally passing two separate enhancers? #3114
Comments
selbekk
pushed a commit
to selbekk/redux
that referenced
this issue
Sep 27, 2018
This commit adds a check for whether the user is passing several enhancers to the `createStore` function. Fixes reduxjs#3114.
I love it enough to create a PR for it :) Perhaps it's a bit too soon - but if nothing else, at least it made me read the source code of Redux for the first time. Thanks for all your work and efforts on Redux @markerikson! |
selbekk
pushed a commit
to selbekk/redux
that referenced
this issue
Sep 27, 2018
This commit adds a check for whether the user is passing several enhancers to the `createStore` function. Fixes reduxjs#3114.
selbekk
pushed a commit
to selbekk/redux
that referenced
this issue
Sep 27, 2018
This commit adds a check for whether the user is passing several enhancers to the `createStore` function. Fixes reduxjs#3114.
timdorr
pushed a commit
that referenced
this issue
Sep 27, 2018
This commit adds a check for whether the user is passing several enhancers to the `createStore` function. Fixes #3114.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've occasionally seen people passing two separate store enhancers to
createStore()
(as seen in this SO question ). This is always an error, and it seems like we could add an additional sanity check tocreateStore()
- probably just checking to see if we have 3 args, and if the second and third are both functions. (I would think we can safely assume that thepreloadedState
argument shouldn't be a function.) It's a rarer problem, but it's preventable.Thoughts?
The text was updated successfully, but these errors were encountered: