Set up
npm i pagerlessimport { PagerlessErrorBoundary } from "pagerless/react";
<PagerlessErrorBoundary fallback={<p>Something went wrong.</p>}>
<App />
</PagerlessErrorBoundary>or on the root
createRoot(el, { onUncaughtError: reactErrorHandler(), onCaughtError: reactErrorHandler() });What it catches
- Errors thrown while rendering components.
- Uncaught errors and failing fetch calls from pagerless/browser.
Questions
Which React versions?
The boundary needs React 16.8 or newer. The root options are React 19's.