-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Migrating to modern redux] Possible Unhandled Promise Rejection TypeError: Object is not a constructor #3241
Comments
That error message should also contain a stack trace, pointing at a specific line in your code. Could you add that? |
Generally though, you should |
Unfortunately, that makes it very difficult to help. All I can suggest is that you do your store setup step by step. Here you are adding an api, the saga middleware, listeners and whatnot all at once. Do one thing after the next. Once that doesn't give you an error, do the next step. Blank state. |
I agree, thanks a lot! I was trying to follow this as well. Will continue to do so. Just a question, I have the plain redux installed as well besides the rtk. Will that cause any issue? |
You don't need it, since plain Redux is part of RTK. But it probably won't cause any problems either. |
I managed to fix that issue, turns out I had to do some cleanups. Thanks a lot, @phryneas for your quick response. You are amazing!
|
Hi, recently I have been trying to migrate our old redux to the redux toolkit in our react native app. I successfully created a separate branch with the redux toolkit working correctly. However, suddenly after a few days, when I returned to this branch my app started to throw this error
Possible Unhandled Promise Rejection: TypeError: Object is not a constructor
I confirmed it to be related toconfgureStore
from redux-toolkit. When I am not using it I do not get this error. Whatever I try to do now I always get this error message. I tried to reset yarn, metro server, etc.This is my store setup,
and in
App.js
, I have the following,Any suggestion on this? Thanks a lot!
The text was updated successfully, but these errors were encountered: