Functional, type-safe event logging SDK for React Native
npm install eventlog-rn> Functional, type-safe event logging SDK for React Native



eventlog-rn is a local-first activity tracker for React Native that helps you understand user behavior and debug issues by recording screens, actions, and errors.
It is designed to be safe, fast, and privacy-focused:
- šāāļø Zero performance impact: Synchronous logging (<1ms) with batched writes.
- š¾ Unlimited storage: Uses MMKV to store thousands of events.
- š Network Logs: Auto-captures fetch and XMLHttpRequest.
- šØ Error Handling: Captures crashes, promise rejections, and React render errors.
- š”ļø Privacy-first: Data stays on the device. you control when to export.
- š§© Type-safe: Built with strict TypeScript and result types for robust error handling.
This is not a cloud analytics platform. It is a tool for developers to capture local context and user journeys for debugging and support.




š Read the Full Documentation
``bash`
npm install eventlog-rn react-native-mmkv
`typescript
import { eventLog } from 'eventlog-rn';
// 1. Initialize (call once at app start)
await eventLog.init(); // Network logging enabled by default!
// 2. Log events
eventLog.screen('HomeScreen');
eventLog.action('button_clicked', { buttonId: 'checkout' });
// 3. Export for debugging
const result = await eventLog.export({ mode: 'repro' });
`
`tsx
import { EventLogViewer, EventLogErrorBoundary } from 'eventlog-rn';
// Wrap app for error handling
``
MIT