React Native with AllStak

Capture crashes, errors, and performance from your React Native (Expo) app with the AllStak SDK.

Source repository:
AllStak/allstak-react-native
Source README:
README.md
SDK version:
0.6.1
Installation source:
npm
Last verified:
2026-05-31

Installation

Install from npm.

npm install @allstak/react-native

Configuration

Initialize and wrap your root App component.

import * as AllStak from '@allstak/react-native';
import App from './App';

AllStak.init({
  apiKey: process.env.EXPO_PUBLIC_ALLSTAK_API_KEY,
  environment: process.env.NODE_ENV ?? 'production',
  release: process.env.EXPO_PUBLIC_RELEASE,
  tracesSampleRate: 1.0,
  enableLogs: true,
});

export default AllStak.wrap(App);

Basic example

Alternatively, wrap the tree with AllStakProvider.

import { AllStakProvider } from '@allstak/react-native';

export default function Root() {
  return (
    <AllStakProvider
      apiKey={process.env.EXPO_PUBLIC_ALLSTAK_API_KEY}
      environment="production"
      release={process.env.EXPO_PUBLIC_RELEASE}
    >
      <App />
    </AllStakProvider>
  );
}

Capturing errors

Capture handled exceptions and messages.

AllStak.captureException(new Error('checkout failed'));
AllStak.captureMessage('cart opened', 'info');

Tracking requests

fetch, XMLHttpRequest, and axios are auto-instrumented (enableHttpTracking, default on); httpTracking configures redaction. The README documents no manual HTTP call — it's config-only.

Best practices

  • Export AllStak.wrap(App) so native crashes are captured.
  • Provide the key via EXPO_PUBLIC_ALLSTAK_API_KEY.
  • Set release to track crash-free sessions per version.