Expo SDK
Install @laydebug/expo in an Expo SDK 57 app.
Peer dependencies match Expo SDK 57. Read https://docs.expo.dev/versions/v57.0.0/ before calling native APIs.
import {
LaydebugProvider,
installCrashHandlers,
RouteTrackerHost,
BugReportScreen,
} from '@laydebug/expo';
installCrashHandlers();
export default function Root() {
return (
<LaydebugProvider apiUrl="https://api.example" projectKey={process.env.EXPO_PUBLIC_LAYDEBUG_KEY!}>
<RouteTrackerHost />
{/* host navigation */}
</LaydebugProvider>
);
}Public API:
LaydebugProvider({ apiUrl, projectKey, getSnapshot?, databaseName? })submitReport(input, { shareLocalState })installCrashHandlers(),ErrorBoundary,BugReportScreensnapshotExpoSqlite(databaseName)andassertSqliteSnapshot- Consent toggle/dialog primitives styled via props
Pass getSnapshot if your app already owns the expo-sqlite handle. Otherwise Laydebug opens databaseName (default laydebug.db) and serializes it.