You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Render ErrorBoundaryContext around fallback UI as well, so the useErrorBoundary hook could be used within the fallback component to reset the boundary.
For example:
import{useErrorBoundary}from"react-error-boundary";functionErrorFallback({ error }){const{ resetBoundary }=useErrorBoundary();return(<divrole="alert"><p>Something went wrong:</p><prestyle={{color: "red"}}>{error.message}</pre><buttononClick={resetBoundary}>Try again</button></div>);}