UNPKG

@splitsoftware/splitio-react

Version:

A React library to easily integrate and use Split JS SDK

15 lines (14 loc) 662 B
import * as React from 'react'; import { ISplitContextValues } from './types'; /** * Split Context is the React Context instance provided by the SplitFactoryProvider and consumed by the Split Hooks. * It is used to share the SDK factory instance and other values across the application. */ export declare const SplitContext: React.Context<ISplitContextValues | undefined>; /** * Hook to access the value of `SplitContext`. * * @returns The Split Context object value * @throws Throws an error if the Split Context is not set (i.e. the component is not wrapped in a SplitFactoryProvider) */ export declare function useSplitContext(): ISplitContextValues;