Replies: 1 comment
-
setQueryData calls onSuccess, that’s the cause. Have you looked at dependent queries: https://react-query.tanstack.com/guides/dependent-queries |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hi, I am asking because I need answers and opinions while using react query.
The first question was trying to format the data by calling another api after onSuccess in the link below.
However, if I remove the comment, it makes an infinite call, what is the cause?
The second question requires an idea.
Similar to the above question, I want to make a query hook that combines data by making consecutive asynchronous calls.
Once you look at the source, I used useState to combine data, but I think there are better opinions.
If you have any ideas, I'd appreciate it if you could give me a comment.
Thank you!
https://codesandbox.io/s/set-query-test-qzhl0?file=/src/List.js
Beta Was this translation helpful? Give feedback.
All reactions