@splitsoftware/splitio-react
Version:
A React library to easily integrate and use Split JS SDK
14 lines (13 loc) • 978 B
TypeScript
import * as React from 'react';
import { ISplitTreatmentsChildProps } from './types';
/**
* High-Order Component for SplitTreatments.
* The wrapped component receives all the props of the container,
* along with the passed props from SplitTreatments (see ISplitTreatmentsChildProps).
*
* @param names - list of feature flag names
* @param attributes - An object of type Attributes used to evaluate the feature flags.
*
* @deprecated `withSplitTreatments` will be removed in a future major release. We recommend replacing it with the `useSplitTreatments` hook.
*/
export declare function withSplitTreatments(names: string[], attributes?: SplitIO.Attributes): <OuterProps>(WrappedComponent: React.ComponentType<OuterProps & ISplitTreatmentsChildProps>, updateOnSdkUpdate?: boolean | undefined, updateOnSdkTimedout?: boolean | undefined, updateOnSdkReady?: boolean | undefined, updateOnSdkReadyFromCache?: boolean | undefined) => (props: OuterProps) => React.JSX.Element;