Recover one failed region without discarding healthy sibling state.
A local failure should have a local recovery boundary when the rest of the interface can still work. ErrorBoundary owns its content and a fallback. A failure retires the affected region instead of exposing a traceback to the page.
ErrorInfo is deliberately redacted. It provides a safe message and correlation identity, while the cause stays in server diagnostics. Retry recreates the failed subtree; it does not undo an already committed business operation.
Understand the moving parts
Keep a healthy sibling outside the boundary. That makes the recovery scope observable: if its draft or count vanishes, the implementation reset too much. A component's local state may correctly restart when its own failed lifetime ends.
The live panel throws a real handler error. Use the sibling while the fallback is visible, then retry. The fallback's retry callback is owned by the current boundary generation and should not revive an older discarded instance.
Fail this panel raises inside the boundary. The fallback displays safe ErrorInfo and its retry button invokes the current retry capability. The sibling counter lives outside the boundary and remains usable while the failed panel is replaced.
Try it live
Increment the sibling, fail the panel, increment the sibling again, and retry the panel.
What to observe
The fallback appears, the sibling keeps its count and the retried panel starts a fresh lifetime.
Healthy local panel
Take this with you
A useful boundary contains failure without disguising what a retry can guarantee.