import React from 'react'; import { UpdateUserFunc } from './StatsigContext'; import { StatsigUser } from 'statsig-js'; import { StatsigOptions } from './StatsigOptions'; /** * Properties required to initialize the Statsig React SDK */ type Props = { children: React.ReactNode | React.ReactNode[]; /** * A client SDK key from the Statsig Console */ sdkKey: string; /** * A Statsig User object. Changing this will update the user and Gate values, causing a re-initialization */ user: StatsigUser; /** * A function to keep your reference to a StatsigUser in-sync with Statsig's reference. * This is required if you want to use the useUpdateUser hook. */ setUser?: UpdateUserFunc; /** * The values to initialize the SDK with. Required for this provider. For non server side rendered use cases, * @see StatsigProvider.tsx */ initializeValues: Record; /** * Options for initializing the SDK, shared with the statsig-js SDK * */ options?: StatsigOptions; shutdownOnUnmount?: boolean; }; /** * The StatsigSynchronousProvider is the top level component from which all React SDK components derive * It initializes the SDK synchronously so child components can use FeatureGate and DynamicConfig values * immediately and you can take advantage of server side rendering of react components. * * The provider accepts the same SDK initialization parameters as the statsig-js SDK. * @param props * @returns */ export default function StatsigSynchronousProvider({ children, sdkKey, user, options, initializeValues, setUser, shutdownOnUnmount, }: Props): JSX.Element; export {};