[Statsig] Onboarding and routing events (#3302)

This commit is contained in:
dan 2024-03-21 11:04:02 +00:00 committed by GitHub
parent ad3dd9f6dc
commit 396d183dfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 282 additions and 201 deletions

View file

@ -1,13 +1,14 @@
import React from 'react'
import {Platform} from 'react-native'
import {AppState, AppStateStatus} from 'react-native'
import {sha256} from 'js-sha256'
import {
Statsig,
StatsigProvider,
useGate as useStatsigGate,
} from 'statsig-react-native-expo'
import {AppState, AppStateStatus} from 'react-native'
import {useSession} from '../../state/session'
import {sha256} from 'js-sha256'
import {LogEvents} from './events'
export type {LogEvents}
@ -24,7 +25,13 @@ const statsigOptions = {
type FlatJSONRecord = Record<
string,
string | number | boolean | null | undefined
| string
| number
| boolean
| null
| undefined
// Technically not scalar but Statsig will stringify it which works for us:
| string[]
>
let getCurrentRouteName: () => string | null | undefined = () => null