@lanternajs/react-native
v0.0.2
Published
React Native in-app performance module for Lanterna
Readme
@lanternajs/react-native
React Native in-app performance module for Lanterna — a CLI-first performance profiler for React Native and Expo apps.
Installation
npm install @lanternajs/react-nativeUsage
Wrap your app root with <LanternaProvider> for zero-config performance profiling:
import { LanternaProvider } from "@lanternajs/react-native";
export default function App() {
return (
<LanternaProvider>
<Stack />
</LanternaProvider>
);
}What's included
- FPS tracking: Real-time UI frame rate via native CADisplayLink (iOS) / Choreographer (Android)
- Memory monitoring: Periodic memory usage snapshots
- Navigation tracking: Auto-detects Expo Router, or pass your own
navigationRef - Network interception: Track request count, duration, and active connections
- Bridge/JSI tracking: Monitor native-JS bridge call frequency
- Hermes profiling: CPU profile sampling via Hermes runtime
- WebSocket streaming: Stream metrics to
lanterna monitorCLI in real-time - Expo DevTools Plugin: Integration with Expo DevTools browser panel
Requirements
- React Native >= 0.73.0
- React >= 18.0.0
License
Apache-2.0 — see LICENSE
