Skip to content

Send a query back into a loading state (Suspense) #3626

Answered by TkDodo
iway1 asked this question in General
Discussion options

You must be logged in to vote

you can remove the query with queryClient.removeQueries or with remove returned from useQuery. it will remove the value from the cache, but not re-render any subscribers. If the component re-renders again, it will go into hard loading state, because it has no data, thus re-throwing to the suspense boundary.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@iway1
Comment options

@TkDodo
Comment options

@iway1
Comment options

Answer selected by iway1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants