UNPKG

@navinc/base-react-components

Version:
31 lines (30 loc) 1.25 kB
import { ReactNode, ComponentType } from 'react'; import { LDClient, LDContext, LDFlagSet, LDOptions } from 'launchdarkly-js-client-sdk'; type LaunchDarklyProviderProps = { clientSideID: string; context: LDContext; options?: LDOptions; children: ReactNode; LoadingContent?: ComponentType; }; /** * @deprecated Use `launchdarkly-react-client-sdk` instead */ export declare const LaunchDarklyProvider: ({ clientSideID, context, options, children, LoadingContent, }: LaunchDarklyProviderProps) => import("react/jsx-runtime").JSX.Element; /** * https://launchdarkly.github.io/js-client-sdk/index.html * https://docs.launchdarkly.com/sdk/client-side/javascript/ * https://docs.launchdarkly.com/home/getting-started * * @deprecated Use `launchdarkly-react-client-sdk` instead */ export declare const useLaunchDarkly: () => { flags: LDFlagSet; isLoading: boolean; isInitialized: boolean; trackMetric: ((key: string, data?: any, metricValue?: number) => void) | undefined; whichVariation: ((key: string, defaultValue?: import("launchdarkly-js-sdk-common").LDFlagValue) => import("launchdarkly-js-sdk-common").LDFlagValue) | undefined; ldclient: LDClient | undefined; hasProvider: boolean; }; export {};