Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: useRevalidator doesn't clear route errors #9713

Closed
charliematters opened this issue Dec 9, 2022 · 7 comments · Fixed by #10369
Closed

[Bug]: useRevalidator doesn't clear route errors #9713

charliematters opened this issue Dec 9, 2022 · 7 comments · Fixed by #10369
Labels

Comments

@charliematters
Copy link

What version of React Router are you using?

6.4

Steps to Reproduce

Throw an error to show the error element. In the error element, resolve the problem and call revalidation.revalidate(). The loader reloads, throws no errors, and then renders the error element

https://stackblitz.com/edit/github-gkokwd?file=src%2FApp.tsx

Expected Behavior

Once the error has been resolved by the error component, revalidating should cause the normal component to be rendered

Actual Behavior

The revalidation is called, the loader is run and returns without error, but the error component is shown

@brophdawg11 brophdawg11 self-assigned this Dec 9, 2022
@brophdawg11
Copy link
Contributor

Yeah this feels like a bug. The error boundary resets on location changes (since there was no useRevalidator in Remix) but it oughta reset on revalidation changes as well.

@github-actions
Copy link
Contributor

This issue has been automatically marked stale because we haven't received a response from the original author in a while 🙈. This automation helps keep the issue tracker clean from issues that are not actionable. Please reach out if you have more information for us or you think this issue shouldn't be closed! 🙂 If you don't do so within 7 days, this issue will be automatically closed.

@brophdawg11
Copy link
Contributor

Bump

@brophdawg11 brophdawg11 added the awaiting release This issue have been fixed and will be released soon label Apr 21, 2023
@brophdawg11 brophdawg11 removed their assignment Apr 21, 2023
@brophdawg11
Copy link
Contributor

This is fixed by #10369 and will be available once React Router 6.11.0 is release

@charliematters
Copy link
Author

That's great news - thanks

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 6.11.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 6.11.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@brophdawg11 brophdawg11 removed the awaiting release This issue have been fixed and will be released soon label Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants