Mobile integration

React Native and Expo Crash Reporting

LoggerAI reports crashes and records sessions in React Native and Expo apps. It's pure JavaScript with no native code, so it works in Expo Go and needs no rebuild.

What LoggerAI records

  • Uncaught errors, unhandled promises and render errors through ErrorBoundary
  • Screens and network calls through fetch, axios and XMLHttpRequest
  • The app going to the background and back, and your own events
  • A Report a problem flow, with screenshots if you add them

React Native 0.70 or later on iOS and Android.

How to set it up

  1. 1. Install the package

    npm install @loggerai/react-native
  2. 2. Start it

    Use your project's public key (pk_live_...), from the Connect page. It can only send sessions, events and errors, so it's safe to ship in an app. Never put the secret key in an app.

    import * as LoggerAI from '@loggerai/react-native'
    import AsyncStorage from '@react-native-async-storage/async-storage'
    
    LoggerAI.init({
      publicKey: 'pk_live_...',
      release: '1.4.2',
      traceHosts: ['api.shop.com'],
      storage: AsyncStorage,
    })
  3. 3. Name your screens with Expo Router

    LoggerAI.useScreen(usePathname())

See every integration, or what you can do with the data in features.

Questions

Does it work in Expo Go?
Yes. It's pure JavaScript with no native code, so it works in Expo Go and needs no rebuild.
Why add AsyncStorage?
It's optional. It keeps crashes across a restart. Without it, a crash that can't be sent before the app closes is lost.

Try it on your own app

The Free plan is free for good, and needs no card.