Skip to main content

Requirements

  • React 18+
This is a dedicated React library — a LerixProvider component, a LerixErrorBoundary, and useLerix()/useLerixNotifications() hooks — built on top of @lerix-dev/lerix-core, the framework-agnostic engine shared by every Lerix web SDK. Building an Angular app instead? See the Angular SDK. If you’re using neither React nor Angular, @lerix-dev/lerix-core also works directly.

1. Add the dependency

2. Register the SDK

Wrap your app in LerixProvider, and LerixErrorBoundary to catch render errors:
main.tsx
Find your API key and project ID in the Lerix Dashboard under Project Settings.
Registration with the backend, and the automatic crash handler, run once at mount — safe even under React 18 StrictMode’s double-effect-invocation in development, since initialization is re-entrant-safe.

Parameters

LerixProvider’s options prop:

3. Verify the integration

Use useLerix() and throw a test error to confirm everything is working:
Then open your dashboard — the error should appear within seconds.
You’re all set! Continue to Error Tracking to report custom errors and enable automatic capture, or Push Notifications to enable push delivery.