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
Outdated @reduxjs/toolkit definition #4326
Comments
Thank you @Brianzchen! This did resolve the particular errors I mentioned above, but still doesn't seem to be working correctly. It seems as though the parameters to In this first case, an action defined in
Here,
Finally, I also see this since a few times I have actions with different types.
|
I see, let me see what I can do |
#4330 here's my WIP this should fix your reducer issue though I'm trying to make the types throw errors if they're not right. Then will look into your action issue too |
That does indeed fix the reducer issue. I'm now left with the following errors:
|
Are some of those errors related to your state obj not typed properly yet? Regarding your action I think you should have those typed as
Let me know what you think and we can move forward 🤞 |
Interesting. I didn't have this issue before I upgraded to the latest version of
|
what happens once you type And does |
I don't have As for |
ok thanks. So basically I'm trying to figure out how I can simulate the same errors you're getting so I (or anyone) can create a fix. I'm just taking stabs in the dark right now. But what if you remove Thanks though for working with me on this, I'm definitely keen to help you get flow-typed defs working but just difficult when I don't use the lib |
Thanks so much for your help! The repository is here if you want to take a look at it. The main branch currently has a bunch of flow-typed libraries removed due to errors, but if you run Removing
|
OK! After much debugging you have two type problems, one is that you are importing
The other is a problem with compatibility of thunk with middlewares because in the past thunk was always passed through a |
I've applied the fixes! As mentioned above you'll just need to change your type imports around a bit and it should work as expected 🙏 |
Thanks so much for spending your time on this! Not sure why I didn't have the same errors before, but switching the type imports fixed things :) |
My pleasure! |
Library definition file name
@reduxjs/toolkit_v1.x.x/flow_v0.104.x-/toolkit_v1.x.x.js
Your dependent version
1.8.2
Flow Version
0.179.0
Description
Do you want to submit a pull request to fix this issue?
No (hope someone else can)
The text was updated successfully, but these errors were encountered: