@flagship.io/react-native-sdk
Version:
Flagship SDK for React Native
11 lines (10 loc) • 515 B
JavaScript
import React from 'react';
import { ABTastyQAEventBus } from '@flagship.io/react-sdk';
import { useMemo } from 'react';
import { ABTastyQAContext } from './ABTastyQAContext';
export function ABTastyQAProvider({ children, isQAModeEnabled, envId, apiKey }) {
const ProviderValue = useMemo(() => ({ ABTastyQAEventBus, isQAModeEnabled, envId, apiKey }), [isQAModeEnabled, envId, apiKey]);
return (<ABTastyQAContext.Provider value={ProviderValue}>
{children}
</ABTastyQAContext.Provider>);
}