Reset
Loading "Reset"
Run locally for transcripts
π¨βπΌ Sometimes errors are temporary and will go away if you just "turn it off and
on again."
react-error-boundary
supports this with a resetErrorBoundary
function it passes to our FallbackComponent
. We can use this to reset the
error boundary and try again.Once you're done, you can test it out. We've still got the typo in our
onSubmit
handler, so go ahead and trigger the error by submitting the form,
then click the "Try again" button to see the error go away.