Using LogRocket

Edit this page

A guide on installing and configuring LogRocket for session replays and error monitoring.


LogRocket records user sessions and identifies bugs as your users use your app. You can filter sessions by update IDs and also connect to your LogRocket account on the Expo dashboard to get quick access to your app's session data.

Install and configure LogRocket

You can install the LogRocket SDK with the following command:

Terminal
npx expo install @logrocket/react-native expo-build-properties

Then, in your app config, include the LogRocket config plugin:

app.json
{
  "plugins": [
    [
      "expo-build-properties",
      {
        "android": {
          "minSdkVersion": 25
        }
      }
    ],
    "@logrocket/react-native"
  ]
}

Finally, initialize LogRocket in your app in a top-level file, like app/_layout.tsx:

app/_layout.tsx
import { useEffect } from 'react';
import * as Updates from 'expo-updates';
import LogRocket from '@logrocket/react-native';

const App = () => {
  useEffect(() => {
    LogRocket.init('<App ID>', {
      updateId: Updates.updateId,
    });
  }, []);
};

In the code above, replace <App ID> with your LogRocket App ID.

Learn more about LogRocket

To learn more about how to use LogRocket with Expo, check out the LogRocket documentation.