UNPKG

@unleash/proxy-client-react

Version:
12 lines (11 loc) 563 B
import React from 'react'; import type { UnleashClient } from 'unleash-proxy-client'; export interface IFlagContextValue extends Pick<UnleashClient, 'on' | 'off' | 'updateContext' | 'isEnabled' | 'getVariant'> { client: UnleashClient; flagsReady: boolean; setFlagsReady: React.Dispatch<React.SetStateAction<IFlagContextValue['flagsReady']>>; flagsError: any; setFlagsError: React.Dispatch<React.SetStateAction<IFlagContextValue['flagsError']>>; } declare const FlagContext: React.Context<IFlagContextValue | null>; export default FlagContext;