Interface LDReactProviderOptions

Options for creating a React Provider.

Hierarchy

  • LDReactProviderOptions

Properties

bootstrap?: unknown

Bootstrap data from the server. Pass the result of flagsState.toJSON() obtained from the server SDK's allFlagsState method.

When provided, the client immediately uses these values before the first network response arrives — eliminating the flag-fetch waterfall on page load.

This is merged into startOptions.bootstrap when the client is started. If both bootstrap and startOptions.bootstrap are provided, this top-level value takes precedence.

deferInitialization?: boolean

If set to true, the LDClient will not start automatically.

Default

false

If initialization is deferred, then the LDClient can be started manually by calling the start function.

Options for the LaunchDarkly client.

Remarks

This option is used to pass options to the LaunchDarkly client.

See

LDReactClientOptions for the possible options

reactContext?: LDReactClientContext

This option allows developers to provide their own named react context for the LaunchDarkly client. This is useful for cases where you want to have multiple clients in the same application. If not provided, the default context will be used.

startOptions?: LDStartOptions

Options for starting the LaunchDarkly client.

Remarks

This option is especially useful if you choose to not defer initialization and want to start the client immediately.

See

LDStartOptions for the possible options

Generated using TypeDoc