Installation
Install @sigsentry/react and confirm peer dependencies
Install the package with your package manager of choice. The SDK is distributed as ESM, fully tree-shakeable, and ships with TypeScript declarations.
Install
pnpm add @sigsentry/reactnpm install @sigsentry/reactyarn add @sigsentry/reactPeer dependencies
@sigsentry/react declares React as a peer dependency. You need
React 18 or later already installed in your project.
| Peer | Required | Notes |
|---|---|---|
react | >=18.0.0 | React 18 or 19 |
react-dom | >=18.0.0 | Matched to your React version |
If you're starting from scratch:
pnpm add react react-dom @sigsentry/reactnpm install react react-dom @sigsentry/reactyarn add react react-dom @sigsentry/reactBundling notes
- ESM only. The package targets modern bundlers (Vite, Next.js, webpack 5+). No CommonJS build is published.
- Tree-shakeable. Importing
<AnalysisWidget />alone won't pull in<SigSentryTrigger />or the embed entry. - No global CSS required. Default styling is inline; the optional CSS variables file is opt-in for theming overrides — see Theming.
- Server components. All exports are client components. Mark any
file using them with
'use client'in the Next.js App Router.
Smoke test
Verify the install with a one-line import:
import { SigSentryProvider, AnalysisWidget } from '@sigsentry/react';
export function Diagnostics(): JSX.Element {
return (
<SigSentryProvider apiKey={process.env.NEXT_PUBLIC_SIGSENTRY_KEY!}>
<AnalysisWidget />
</SigSentryProvider>
);
}If the import resolves and TypeScript is happy, you're ready to configure the provider.
