SDKs

React Native SDK

Package: @veriq/react-native

Captures JS errors, promise rejections, console breadcrumbs, navigation events, and device context. Works with React Navigation.

Install with Claude Code

Install with Claude Code

Paste this prompt into Claude Code. It will install the SDK, configure your app, and add the DSN env var automatically.

Add the @veriq/react-native SDK to my React Native project.

Steps:
1. Run: npm install @veriq/react-native
2. In index.js (before AppRegistry.registerComponent), add:
   import { init } from '@veriq/react-native';
   init({ dsn: '[YOUR_DSN]', environment: __DEV__ ? 'development' : 'production' });
3. For React Navigation breadcrumbs, add createNavigationRef and useNavigationBreadcrumbs from '@veriq/react-native/navigation'
4. Verify by calling captureException(new Error('test')) and checking the veriq dashboard

My DSN: [paste your DSN from Project Settings → API Keys]

Install

bash
npm install @veriq/react-native

Initialize

Call init() before AppRegistry.registerComponent:

ts
// index.js
import { AppRegistry } from 'react-native';
import { init } from '@veriq/react-native';
import App from './App';

init({
  dsn: process.env.VERIQ_DSN ?? 'pk_...',
  release: '1.0.0',
  environment: __DEV__ ? 'development' : 'production',
});

AppRegistry.registerComponent('MyApp', () => App);

Wire up React Navigation to record screen transitions as breadcrumbs:

tsx
import { NavigationContainer } from '@react-navigation/native';
import { createNavigationRef, useNavigationBreadcrumbs } from '@veriq/react-native/navigation';

const navRef = createNavigationRef();

export default function App() {
  useNavigationBreadcrumbs(navRef);

  return (
    <NavigationContainer ref={navRef}>
      {/* ... */}
    </NavigationContainer>
  );
}

Manual capture

ts
import { captureException, captureMessage } from '@veriq/react-native';

try {
  await riskyOperation();
} catch (err) {
  captureException(err);
}

captureMessage('Purchase completed');

What's captured automatically

  • Unhandled JS errors (via ErrorUtils.setGlobalHandler)
  • Unhandled promise rejections (Hermes)
  • console.error and console.warn as breadcrumbs
  • Network requests as breadcrumbs (fetch)
  • App lifecycle events (foreground / background)
  • Device model and OS version in event context