@splitsoftware/splitio-react
Version:
A React library to easily integrate and use Split JS SDK
15 lines (14 loc) • 1.16 kB
TypeScript
import * as React from 'react';
import { ISplitFactoryChildProps } from './types';
/**
* High-Order Component for `SplitFactoryProvider`.
* The wrapped component receives all the props of the container,
* along with the passed props from the Split context (see `ISplitFactoryChildProps`).
*
* @param config - Config object used to instantiate a Split factory
* @param factory - Split factory instance to use instead of creating a new one with the config object.
* @param attributes - An object of type Attributes used to evaluate the feature flags.
*
* @deprecated `withSplitFactory` will be removed in a future major release. We recommend replacing it with the `SplitFactoryProvider` component.
*/
export declare function withSplitFactory(config?: SplitIO.IBrowserSettings, factory?: SplitIO.IBrowserSDK, attributes?: SplitIO.Attributes): <OuterProps>(WrappedComponent: React.ComponentType<OuterProps & ISplitFactoryChildProps>, updateOnSdkUpdate?: boolean | undefined, updateOnSdkTimedout?: boolean | undefined, updateOnSdkReady?: boolean | undefined, updateOnSdkReadyFromCache?: boolean | undefined) => (props: OuterProps) => React.JSX.Element;