Replies: 4 comments 7 replies
-
Hi 👋 Essentially, what I think is happening here is that by enabling I'm not a maintainer and I don't have enough knowledge of the internals to reason about this so I'll leave it to someone who knows more than me, but hopefully this offers some insight 🙂 |
Beta Was this translation helpful? Give feedback.
-
Also, why the erroneous query is not refetched once it is mounted again and stale? |
Beta Was this translation helpful? Give feedback.
-
Because the error boundary has not been reset. have you seen: https://tanstack.com/query/v4/docs/react/reference/QueryErrorResetBoundary Here's a fork of your sandbox: https://codesandbox.io/s/unruffled-framework-g054et?file=/src/App.js |
Beta Was this translation helpful? Give feedback.
-
Hello @TkDodo we have little bit different case and I do not how to solve it. Please can you help me? My codesandbox https://codesandbox.io/s/eloquent-black-ep5no7?file=/src/App.tsx. Just start on the "/offer" and wait until fallback shows. After that move to the "/" and after that move back to the "/offer". My expectation is that there will be retries on mount but fallback is shown immediately. I already tried:
In our case, we cannot add an extra button to reset the state as you did in https://codesandbox.io/s/unruffled-framework-g054et?file=/src/App.js |
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.
-
I tried it enabled/disabled, with/without suspense and the query never retries on the mount, instead returns an error from the cache.
Example https://codesandbox.io/s/misty-forest-mljc1y?file=/src/App.js
Try to show and hide the component using the button. No fetch on remount is logged.
What am I doing wrong and how can an erroneous query be refetched on mount?
RQ 4.22.4
Beta Was this translation helpful? Give feedback.
All reactions