CatchBoundary - no way to reset when an error is thrown in a queryFn #5074
tomerzcod7
started this conversation in
General
Replies: 1 comment 1 reply
-
I don’t think you need your own |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
When using router & query together, I can't seem to find a good way to reset the CatchBoundary when a queryFn that is rendered in a children is rerendering/refetching, etc.
There's a guide on how to do this with react-error-boundary - https://tanstack.com/query/latest/docs/framework/react/reference/QueryErrorResetBoundary
CatchBoundary doesn't have a method to reset imperatively, only the getResetKey.
Am I missing something here? Should I not be using CatchBoundary for this?
Code example:
{component} is dynamically rendered based on the
sidebar
query stringThe solution here is not good enough because the CatchBoundary won't reset if the query refetches not by the user clicking the Reload button
Beta Was this translation helpful? Give feedback.
All reactions