The waitForInitialization
option in the statsig-react
sdk is used to delay the rendering of your application until the SDK has finished initializing. This ensures that the correct feature gate values are available when your components are rendered. If you're seeing users in the "uninitialized" group, it could mean that the SDK initialization is not yet complete when your application checks a feature gate, experiment, dynamic config, or layer.
If you set waitForInitialization
false, you should get an uninitialized check, and then once SDK initialization completes, you should get another check with the actual value (assuming the network request was successful for initialization).
Alternatively, you can choose to bootstrap the statsig-react
sdk and render a StatsigSynchronousProvider
. This requires you to integrate a statsig server SDK on your backend to generate the values via the getClientInitializeResponse
method, and then pass them to the client side so they are immediately available. Refer to the bootstrapping documentation for more information:
https://docs.statsig.com/client/concepts/bootstrapping