Readonly loggerReturns the initialization state of the client. This function is helpful to determine whether LDClient can be used to evaluate flags on initial component render.
The initialization state of the client.
LDWaitForInitializationResult for the possible values and their meaning
Subscribes to context changes triggered by identify(). The callback is invoked
after each successful identify() call with the new resolved context.
Function called with the new context after each successful identify.
An unsubscribe function. Call it to stop receiving notifications.
Subscribes to context changes triggered by identify(). The callback is invoked
after each successful identify() call with the new resolved context.
An unsubscribe function. Call it to stop receiving notifications.
Subscribes to initialization status changes triggered when the client is initialized.
Function called with the initialization result.
An unsubscribe function. Call it to stop receiving notifications.
Subscribes to initialization status changes triggered when the client is initialized.
An unsubscribe function. Call it to stop receiving notifications.
Sets the connection mode for the SDK's data system.
When set, this mode is used exclusively, overriding all automatic mode selection (including setStreaming). The setStreaming state is not modified -- setConnectionMode acts as a higher-priority override.
Pass undefined (or call with no arguments) to clear the override and
return to automatic mode selection.
This method requires the FDv2 data system (dataSystem option). If
FDv2 is not enabled, the call logs a warning and has no effect.
This method is not stable, and not subject to any backwards compatibility guarantees or semantic versioning. It is in early access. If you want access to this feature please join the EAP. https://launchdarkly.com/docs/sdk/features/data-saving-mode
Optional mode: FDv2ConnectionModeThe connection mode to use, or undefined to clear the override.
Optional Specifies whether or not to open a streaming connection to LaunchDarkly for live flag updates.
If this is true, the client will always attempt to maintain a streaming connection; if false,
it never will. If you leave the value undefined (the default), the client will open a streaming
connection if you subscribe to "change" or "change:flag-key" events (see LDClient.on).
This can also be set as the streaming property of LDOptions.
Optional streaming: booleanOptional Internal
Returns whether flag keys should be converted to camelCase in useFlags().
Defaults to true when absent.
Whether flag keys should be converted to camelCase.
NOTE: This method is only used by useFlags() hook.
This method is deprecated and will be removed in a future major version.
Starts the client and returns a promise that resolves to the initialization result.
The promise will resolve to a LDWaitForInitializationResult object containing the status of the waitForInitialization operation.
Optional options: LDStartOptionsOptional configuration. Please see LDStartOptions.
Optional Optional defaultValue: anyOptional Optional options: LDWaitForInitializationOptionsOptional Generated using TypeDoc
The LaunchDarkly client interface for React.