JoschuaSchneider/use-error-boundary

Reset the errored State?

Closed this issue · 3 comments

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.

Good point!

How would you expect the method to be named?

I would suggest the method name to be either reset or resetError.

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 😊