UNPKG

@flagship.io/react-native-sdk

Version:
11 lines (10 loc) 515 B
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>); }