# Pagerless for React

> An error boundary, or React's root error options. Start the client first with the browser or React Native SDK.

URL: https://pagerless.dev/integrations/react
Updated: 2026-10-22

## Set up

```bash
npm i pagerless
```

```tsx
import { PagerlessErrorBoundary } from "pagerless/react";

<PagerlessErrorBoundary fallback={<p>Something went wrong.</p>}>
  <App />
</PagerlessErrorBoundary>
```

```tsx
createRoot(el, { onUncaughtError: reactErrorHandler(), onCaughtError: reactErrorHandler() });
```

## What it catches

- Errors thrown while rendering components.
- Uncaught errors and failing fetch calls from [pagerless/browser](https://pagerless.dev/integrations/browser).

## Questions

### Which React versions?

The boundary needs React 16.8 or newer. The root options are React 19's.
