@unleash/proxy-client-react
Version:
React interface for working with unleash
12 lines (11 loc) • 563 B
TypeScript
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;