The React Native LaunchDarkly client. Instantiate this class to create an instance of the ReactNativeLDClient and pass it to the LDProvider.

Example

const featureClient = new ReactNativeLDClient(MOBILE_KEY, AutoEnvAttributes.Enabled);

<LDProvider client={featureClient}>
<Welcome />
</LDProvider>

Hierarchy

Constructors

Properties

autoEnvAttributes: AutoEnvAttributes
config: default
context?: LDContext
diagnosticsManager?: DiagnosticsManager
eventProcessor?: EventProcessor
highTimeoutThreshold: number
identifyTimeout: number
logger: LDLogger
platform: Platform
sdkKey: string

Methods

  • Parameters

    • key: string
    • defaultValue: boolean

    Returns boolean

  • Returns Promise<void>

  • Returns Promise<{
        error?: Error;
        result: boolean;
    }>

  • Identifies a context to LaunchDarkly. See LDClient.identify.

    Parameters

    • pristineContext: LDContext

      The LDContext object to be identified.

    • Optional identifyOptions: LDIdentifyOptions

      Optional configuration. See LDIdentifyOptions.

      Optional

    Returns Promise<void>

    A Promise which resolves when the flag values for the specified context are available. It rejects when:

    1. The context is unspecified or has no key.

    2. The identify timeout is exceeded. In client SDKs this defaults to 5s. You can customize this timeout with LDIdentifyOptions | identifyOptions.

    3. A network error is encountered during initialization.

  • Returns boolean

  • Parameters

    • key: string
    • defaultValue: unknown

    Returns unknown

  • Parameters

    • key: string
    • defaultValue: number

    Returns number

  • Parameters

    • eventName: EventName
    • listener: Function

    Returns void

  • Parameters

    • eventName: EventName
    • listener: Function

    Returns void

  • Sets the SDK connection mode.

    Parameters

    Returns Promise<void>

  • Parameters

    • key: string
    • defaultValue: string

    Returns string

  • Parameters

    • key: string
    • Optional data: any
      Optional
    • Optional metricValue: number
      Optional

    Returns void

  • Parameters

    • flagKey: string
    • Optional defaultValue: any
      Optional

    Returns any

Generated using TypeDoc