[v3] Reset error boundary when component unmounts #1253
Unanswered
alexandernanberg
asked this question in
Ideas
Replies: 0 comments
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.
-
I think it would be really neat if the error boundary would automatically reset when the component unmounts. (FYI I have suspense enabled)
Let's imagine the following scenario:
/foo
and clicks on a link to/bar
/bar
and error boundary is displayedfoo
IMO it doesn't make sense to display the error boundary again, but we should display the loading state again.
This would also make resetting react error boundaries easier because we could just set a new
key
on the component.Beta Was this translation helpful? Give feedback.
All reactions