You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
errors are cached and not reset if the component using useQuery is remounted #468
Close the error report window then click "retry". That will remount the Posts component but it will error immediately.
If you uncomment the queryCache.clear() it works.
I would expect that errors are not cached, or that they're cleared when the component is remounted.
My guess is that since the component never officially mounts, there's some edge case here that isn't accounted for, or that this is an intractable problem and I should just always clear the cache on an error (which may very well be a good idea anyway).
@tannerlinsley I am also getting the same issue in v.2.26.3. For us the cache clearing is not an optimal solution. Perhaps this issue should be reopened?
We just ran into the same issue with v3.27.0. If I get a chance to make a code sandbox I will.
This will get us by for now:
const{ reset }=useQueryErrorResetBoundary();constqueryClient=useQueryClient();constresetErrors=()=>{queryClient.clear();reset();}return(<ErrorBoundaryonReset={resetErrors}fallbackRender={Fallback}>{ children }</ErrorBoundary>);
Reacted by 김의진, ico-dev-seongjin, hussa0, 정진원 and Valery Zinchenko
Can you try updating to the latest version please? I remember we had a bug somewhere that was since fixed. Otherwise please open a new issue with a codesandbox reproduction
Activity
tannerlinsley commentedon May 9, 2020
I’m looking into this
tannerlinsley commentedon May 11, 2020
🎉 This issue has been resolved in version 1.4.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
aaronjensen commentedon May 11, 2020
Thank you for the quick fix.
jacklj commentedon Dec 15, 2020
Hello, I'm getting the same issue in
v.2.26.4, so I guess there was a regression? Have solved it by clearing the cache as above, but just FYI. Thanks.danowens1 commentedon Jan 25, 2021
@tannerlinsley I am also getting the same issue in
v.2.26.3. For us the cache clearing is not an optimal solution. Perhaps this issue should be reopened?TkDodo commentedon Jan 25, 2021
Feel free to create a new issue / discussion with a codesandbox that shows the issue, preferably on v3.
jakepeyser commentedon Feb 11, 2021
For others facing this issue in
v2.26.x, it looks like like the bug was also observed in #1412 (comment) and is being addressed in #1781tncbbthositg commentedon Nov 11, 2021
We just ran into the same issue with
v3.27.0. If I get a chance to make a code sandbox I will.This will get us by for now:
TkDodo commentedon Nov 11, 2021
Can you try updating to the latest version please? I remember we had a bug somewhere that was since fixed. Otherwise please open a new issue with a codesandbox reproduction