Replies: 1 comment
-
you want https://tanstack.com/query/v4/docs/react/reference/useQuery
|
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
-
I'm trying to work around the following behavior which seems intentional:
In step 3, I don't want that newly mounted component to attempt a fetch, but rather render the error state.
I'm assuming since the query has never succeeded, this technically isn't a "refetch", so the following options have no effect:
The only hacky option I can think of is setting
enabled
tofalse
, checking if the query is in an errored state, then forcing a refetch.. which then disables the auto-fetch I still want for the other components using this query.Are there any other options I missed in the documentation for this desired behavior, or cleaner workarounds to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions