Reset the errored State?
Closed this issue · 3 comments
futursolo commented
Sometimes it makes sense to reset the error that's been received by an error boundary.
(Like an HTTP 403 should redirect to login, etc.)
It would be nice if there's a way to clear the error state.
JoschuaSchneider commented
Good point!
How would you expect the method to be named?
futursolo commented
I would suggest the method name to be either reset
or resetError
.
JoschuaSchneider commented
Sounds good, I put together a PR with reset
.
I will play around with the implementation to make sure its consistent, and then release it within the next days.
Thanks for your suggestion 😊