-
Hi, At some actions, I return from the server the new data, like the new user data. Instead of refetching after the api success and having to wait X ms, I wish there was something like const query = useQuery(...)
const myFunc = useCallback(() => query.setData(await apiCall()), []) Is this already possible? |
Beta Was this translation helpful? Give feedback.
Answered by
ftzi
May 5, 2022
Replies: 1 comment 1 reply
-
Found https://react-query.tanstack.com/guides/updates-from-mutation-responses. Not really in the way I wanted, but seems to do the job. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ftzi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found https://react-query.tanstack.com/guides/updates-from-mutation-responses. Not really in the way I wanted, but seems to do the job.