• Creates an instance of the LaunchDarkly client. Note that the client will not be ready to use until LDClient.start is called.

    Usage:

    import { createClient } from 'launchdarkly-js-client-sdk';
    const client = createClient(clientSideId, context, options);

    // Attach event listeners and add any additional logic here

    // Then start the client
    client.start();

    Parameters

    • clientSideId: string

      The client-side ID, also known as the environment ID.

    • pristineContext: LDContext

      The initial context used to identify the user.

    • Optional options: LDOptions

      Optional configuration settings.

      Optional

    Returns LDClient

    The new client instance.

    Remarks

    The client will not automatically start until LDClient.start is called in order to synchronize the registering of event listeners and other initialization logic that should be done before the client initiates its connection to LaunchDarkly.

    See

Generated using TypeDoc