ErrorBoundary

Catches render errors below it and shows ErrorState with a reset; resetKeys clear it.

Playground

Errors thrown while rendering children become an inline ErrorState with a reset.

<ErrorBoundary resetKeys={[selectedId]} onError={report}>
  <ObjectDetail id={selectedId} />
</ErrorBoundary>
Rendering fine. Press the button to crash this subtree.