Make a note on documentation regarding the queryFulfilled #3077
panoramix360
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
I'm confused. How does React Native's runtime affect behavior here? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Just for context, I'm using the RTK Query on a React Native environment.
I have a code that uses the result from
queryFulfilled
to update a cached query.You can notice that the result returned by the
queryFulfilled
is being changed because the API does not return it.While this works great on Debug environment, I noticed that the attribution was not working on a Release environment.
After some research, I discovered that React Native uses slightly different JavaScript runtimes for production and debugging.
So, to fix this I needed to change the code to copy the result and use this copied object to update the cached query.
And this finally worked locally and on production.
I don't know if I'm doing something wrong, but maybe this could be informed on the documentation like a warning to the devs.
Please, let me know what you think, and thank you for reading!
Beta Was this translation helpful? Give feedback.
All reactions