useSuspenseQuery error handling is not obvious #6361
-
Hey, it's me again with problems with useSuspenseQuery) Sorry) So, I've tried to implement the most simple example of React-way any loading/error react-query state handling: https://stackblitz.com/edit/stackblitz-starters-pbafai If you click button "up", there is 50% probability (before
Looks like react-query tried to render
In case of error, after clicking to "reset" there is no any requests, any renders — nothing, actually) Looks like it is because of:
in the default options? But this behaviour is really not obvious. I don't know, may be we need a specific docs about loading/error handling in React-way with react-query? I mean specific defaults. May be something else. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
don't set |
Beta Was this translation helpful? Give feedback.
don't set
retryOnMount: false
. It needs to be true so that there will be a refetch (and a re-suspend) when using error boundaries. What do you want to achieve by setting it to false ?