Replies: 3 comments 5 replies
-
What is your use case or reasoning? Perhaps if I can understand that, I could offer better advice. |
Beta Was this translation helpful? Give feedback.
-
Performance wise it would definitely be nice if the number of renders could be reduced. When looking at the state between the renders, the second and third render do not seem to be relevant for a consumer. Would it be possible to avoid these intermediate renders? First render state:
Second render state:
Third render state:
Fourth render state:
|
Beta Was this translation helpful? Give feedback.
-
React Query is attempting to automatically re-run the query in an attempt to recover from the error. To avoid unnecessary multiple renders, you can use the following approach:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Ideally, when fetching async data, a component would only have two renders
I have previously detailed how
useQuery
causes 4 renders in #685Is there a way to accomplish this with
useQuery
without usingSuspense
? I would like to avoid using using any experimental features.Beta Was this translation helpful? Give feedback.
All reactions