Answer
An error boundary is a class component (or library wrapper) that catches JavaScript errors in its child tree during render, lifecycle methods, and constructors — and shows a fallback UI instead of crashing the whole app.
Catches: render errors, lifecycle errors, constructors in child tree.
Does NOT catch: event handlers, async code (setTimeout, promises), SSR errors, errors in the boundary itself.