@spectosh/react-native 0.3.0 → 0.3.1
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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/core.js +1 -1
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ console.
|
|
|
50
50
|
// or by hand
|
|
51
51
|
specto.screen('Checkout')
|
|
52
52
|
|
|
53
|
-
specto.identify(user.id, {
|
|
53
|
+
specto.identify(user.id) // optional traits, your app's own: { role: 'admin' }
|
|
54
54
|
specto.track('checkout_started', { items: 3 })
|
|
55
55
|
specto.captureError(error) // caught errors; uncaught ones are recorded for you
|
|
56
56
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectosh/react-native",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Specto for React Native apps — screens, requests, logs, errors and custom events in the same sessions, issues and funnels as your web app. No dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
package/src/core.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// Batches are numbered (b) per session, and a failed batch is retried with
|
|
15
15
|
// the same number, so the server stores it once however often it arrives.
|
|
16
16
|
|
|
17
|
-
export const VERSION = '0.3.
|
|
17
|
+
export const VERSION = '0.3.1'
|
|
18
18
|
|
|
19
19
|
const SESSION_IDLE_MS = 30 * 60_000 // back from the background after this: a new session
|
|
20
20
|
const FLUSH_MS = 5_000
|
package/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// import { init } from '@spectosh/react-native'
|
|
6
6
|
// const specto = await init({ key: 'pk_…', endpoint: 'https://specto.example.com', storage: AsyncStorage, app: { name: 'Shop', version: '1.4.2' } })
|
|
7
7
|
// specto.trackNavigation(navigationRef) // React Navigation: screens
|
|
8
|
-
// specto.identify(user.id
|
|
8
|
+
// specto.identify(user.id) // optional traits: { role: 'admin' }
|
|
9
9
|
// specto.track('checkout_started', { items: 3 })
|
|
10
10
|
import { AppState, Platform } from 'react-native'
|
|
11
11
|
import { createSpecto } from './core.js'
|