npm / react-error-boundary
react-error-boundary
What changed in react-error-boundary 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
1 breaking1 new APIs and options1 performance1 tooling5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreact-error-boundary 69 changes
Breaking changes 1
The error type changes from Error to unknown.
New APIs and options 1
Exports the getErrorMessage helper method.
Performance 1
Context values are memoized to avoid unnecessary consumer renders when boundary state is unchanged.
Tooling 1
Added @types/react as an optional peer dependency.
Fixes and other changes 5
An explicitly provided undefined fallback is accepted, but logs an error in development.
Types preserve optional defaulted props in withErrorBoundary.
Infers the wrapped component's ref type.
Handles the edge case where null is used as a thrown value.
Removed react-dom from the peer dependencies list because it was accidentally added during a previous internal refactor.