eventlog-rn 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +17 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,19 +8,21 @@
8
8
 
9
9
  ## What is this?
10
10
 
11
- # eventlog-rn
11
+ **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.
12
12
 
13
- Functional, type-safe event logging SDK for React Native.
13
+ It is designed to be **safe**, **fast**, and **privacy-focused**:
14
+ - 🏃‍♂️ **Zero performance impact**: Synchronous logging (<1ms) with batched writes.
15
+ - 💾 **Unlimited storage**: Uses MMKV to store thousands of events.
16
+ - 🌐 **Network Logs**: Auto-captures `fetch` and `XMLHttpRequest`.
17
+ - 🚨 **Error Handling**: Captures crashes, promise rejections, and React render errors.
18
+ - 🛡️ **Privacy-first**: Data stays on the device. you control when to export.
19
+ - 🧩 **Type-safe**: Built with strict TypeScript and result types for robust error handling.
14
20
 
15
- Optimized for **reliability**, **performance**, and **ease of use**.
21
+ This is **not** a cloud analytics platform. It is a tool for developers to capture local context and user journeys for debugging and support.
16
22
 
17
- ## Features
23
+ ## Documentation
18
24
 
19
- - **Type-Safe**: Full TypeScript support with generics.
20
- - **Batched Uploads**: Efficiently queues events to minimize network requests.
21
- - **Offline Support**: Caches events when offline and syncs when back online.
22
- - **Session Tracking**: Automatic session management.
23
- - **Built-in UI**: Inspect logs on-device with the included Viewer component.
25
+ 📚 **[Read the Full Documentation](https://nainglynndw.github.io/eventlog-rn/)**
24
26
 
25
27
  ## Quick Start
26
28
 
@@ -35,12 +37,8 @@ npm install eventlog-rn react-native-mmkv
35
37
  ```typescript
36
38
  import { eventLog } from 'eventlog-rn';
37
39
 
38
- // Initialize at app launch based on your config
39
- eventLog.init({
40
- // ...
41
- });
42
- ```
43
- Network logging enabled by default!
40
+ // 1. Initialize (call once at app start)
41
+ await eventLog.init(); // Network logging enabled by default!
44
42
 
45
43
  // 2. Log events
46
44
  eventLog.screen('HomeScreen');
@@ -48,8 +46,11 @@ eventLog.action('button_clicked', { buttonId: 'checkout' });
48
46
 
49
47
  // 3. Export for debugging
50
48
  const result = await eventLog.export({ mode: 'repro' });
49
+ ```
50
+
51
+ ### 3. View logs (optional)
51
52
 
52
- // 4. View logs (optional)
53
+ ```tsx
53
54
  import { EventLogViewer, EventLogErrorBoundary } from 'eventlog-rn';
54
55
 
55
56
  // Wrap app for error handling
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eventlog-rn",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Functional, type-safe event logging SDK for React Native",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",