unstale

npm / react-error-boundary

react-error-boundary

What changed in react-error-boundary 4 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

4 breaking2 new APIs and options1 performance1 tooling6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

react-error-boundary 610 changes

Breaking changes 2

  • The error type changes from Error to unknown.

    6.1.0release notes

  • The module is ESM-only to better work with modern tooling.

    6.0.0release notes

New APIs and options 1

Performance 1

  • Context values are memoized to avoid unnecessary consumer renders when boundary state is unchanged.

    6.1.6release notes

Tooling 1

  • Added @types/react as an optional peer dependency.

    6.1.3release notes

Fixes and other changes 5

  • An explicitly provided undefined fallback is accepted, but logs an error in development.

    6.1.6release notes

  • Types preserve optional defaulted props in withErrorBoundary.

    6.1.6release notes

  • Infers the wrapped component's ref type.

    6.1.5release notes

  • Handles the edge case where null is used as a thrown value.

    6.1.4release notes

  • Removed react-dom from the peer dependencies list because it was accidentally added during a previous internal refactor.

    6.0.3release notes

react-error-boundary 51 changes

Fixes and other changes 1

  • Updated the withErrorBoundary types to be compatible with the latest forwardRef types.

    5.0.0release notes

react-error-boundary 43 changes

Breaking changes 2

  • onReset and onResetKeys behavior is merged; onReset receives a details object explaining the cause of the reset.

    4.0.0release notes

  • Replaced by useErrorBoundary. For errors already available during render, throw the value directly instead.

    4.0.0release notes

New APIs and options 1

  • Adds showBoundary to send errors from event handlers or async code to the nearest boundary, and resetBoundary to request a retry.

    4.0.0release notes