Whether to send flag evaluation events when a flag is read from the flags
object
returned by the useFlags
hook. This is true by default, meaning flag evaluation
events will be sent by default.
Whether the React SDK should transform flag keys into camel-cased format. Using camel-cased flag keys allow for easier use as prop values, however, these keys won't directly match the flag keys as known to LaunchDarkly. Consequently, flag key collisions may be possible and the Code References feature will not function properly.
This is true by default, meaning that keys will automatically be converted to camel-case.
For more information, see the React SDK Reference Guide on flag keys.
Generated using TypeDoc
The
LDProvider
is a component which accepts a config object which is used to initializelaunchdarkly-js-client-sdk
.This Provider does three things:
launchdarkly-js-client-sdk
initialize oncomponentDidMount
Because the
launchdarkly-js-client-sdk
in only initialized oncomponentDidMount
, your flags and the ldClient are only available after your app has mounted. This can result in a flicker due to flag changes at startup time.This component can be used as a standalone provider. However, be mindful to only include the component once within your application. This provider is used inside the
withLDProviderHOC
and can be used instead to initialize thelaunchdarkly-js-client-sdk
. For async initialization, check out theasyncWithLDProvider
function