File tree 1 file changed +4
-6
lines changed
trackers/react-native-tracker/src
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { EventStore , EventStorePayload , newInMemoryEventStore } from '@snowplow/tracker-core' ;
2
- import { AsyncStorage , EventStoreConfiguration , TrackerConfiguration } from './types' ;
3
-
4
- type Configuration = Omit < EventStoreConfiguration , 'asyncStorage' > &
5
- TrackerConfiguration & { asyncStorage : AsyncStorage } ;
2
+ import { EventStoreConfiguration , TrackerConfiguration } from './types' ;
3
+ import DefaultAsyncStorage from '@react-native-async-storage/async-storage' ;
6
4
7
5
export async function newReactNativeEventStore ( {
8
6
namespace,
9
7
maxEventStoreSize = 1000 ,
10
8
useAsyncStorageForEventStore : useAsyncStorage = true ,
11
- asyncStorage,
12
- } : Configuration ) : Promise < EventStore > {
9
+ asyncStorage = DefaultAsyncStorage ,
10
+ } : TrackerConfiguration & EventStoreConfiguration ) : Promise < EventStore > {
13
11
const queueName = `snowplow_${ namespace } ` ;
14
12
15
13
async function newInMemoryEventStoreForReactNative ( ) {
You can’t perform that action at this time.
0 commit comments