-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Mutation get stuck in pending state #4447
Comments
I fear this is way too specific for any of us to reproduce and look at - if you can build some more generic reproduction that we can actually run, we could take a look, but like this I'm not sure we can help you, sorry :/ |
@phryneas It s a company project so is hard to share a reproducible case for u. But I swear my implementation is so simple like that. May be is useful look my root navigator: |
@phryneas and funny fact: if I remove all code lines on queryFn and just return an empty array the problem persist |
Can you tell us what version of Redux-toolkit, React-Redux, React-Native and React you're running? Maybe that'll give some sort of clue as to where the issue is coming from. |
@aryaemami59 of course...
|
after many hours trying different approaches I can't get it... I think it is a bug related between RTKQuery and react-navigation/native |
@LucasHimelfarb Can you add this to your "@reduxjs/toolkit": "https://pkg.csb.dev/reduxjs/redux-toolkit/commit/d86ec94b/@reduxjs/toolkit", |
Thanks for u suggest @aryaemami59 Getting the same behavior :/ |
@LucasHimelfarb this is a longshot, but can you also try with the most recent React-Redux version? |
@aryaemami59 I tried it together with the last thing you shared with me and with the latest version of react-redux (9.1.2) and I get the same behavior |
@LucasHimelfarb Then in that case, I think our best bet is if you put together a small repro, I understand it's probably time consuming, but it's very difficult to tell what's going on without having a sample of the problem to look at. |
Hello when a navigator stack is replaced, is it possible that the mutation state is lost or reset ? |
@aryaemami59 In this week I can't build a repo to reproduce the error because my job... but I'll try to do it on the weekend.... |
@LucasHimelfarb Awesome. Let me know when you do so I can take a look. |
I am facing this same issue. I will also note that uninitialized is |
Might this be related? I would try rolling back to |
@aryaemami59 new update: this happened only with queryFn thats not return a string as a data |
@LucasHimelfarb sorry you said this only happens if |
In my React Native application, I implement React Navigation and have two stack navigators... After replacing one with the other, a screen is rendered that will make two requests using RTK Query. The first is a simple query to obtain some authorization tokens, which resolves without any issues. The second is a mutation that implements a queryFn...
and those queries called in my screen:
But the getCredits mutation never resolve with success even if the requests defined in queryFn was resolved, the data value is unfilled in the screen side and the flag isLoading is always true.
All works fine when the replace of stack navigators never happens
The text was updated successfully, but these errors were encountered: