Expo

The LogRocket SDK for Expo allows you to capture session replays, network requests and logs from Expo applications.

Quick Start

Register with LogRocket

Go to https://logrocket.com/signup to create a free trial account. If you already have a LogRocket account, you can use your existing account. All LogRocket accounts include 1,000 free mobile sessions.

Adding the SDK

Our React Native package is available on NPM. New releases of the LogRocket Native SDKs are catalogued on our Mobile SDK Changelog (the current release is 0.23.2).

expo install @logrocket/react-native

Initializing the SDK

Initializing the SDK is as simple as importing the package and running the initialization method. A good place to initialize the SDK is in a useEffect hook in your top-level Application component.

Replace <APP_SLUG> with your LogRocket application slug, located in our dashboard's quick start guides.

import React, { useEffect } from 'react';
import LogRocket from '@logrocket/react-native';

const App = () => {
  useEffect(() => {
    LogRocket.init('<APP_SLUG>');
  }, []);
  // Your application entry
};

Local Development Limitations

Expo Go, the local development client for the Expo Framework, does not support Native code additions. Our SDK uses Native code to power the entire system, and cannot run in the Expo Go client.

Our SDK will be fully operational when built with the EAS Build system, which can be accomplished locally provided the appropriate tooling is available.

Further Reading

For more information on using our SDK in React Native check out our documentation.