Function createClient

  • Creates an instance of the LaunchDarkly client. The client is pre-configured for observability.

    Usage:

    import { createClient } from '@launchdarkly/browser';
    const client = createClient(clientSideId, context, options);

    // Attach event listeners and add any additional initialization logic here

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

    Parameters

    • clientSideId: string

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

    • context: LDContext

      The initial context used to identify the user.

    • Optional options: LDBrowserOptions

      Optional configuration settings.

      Optional

    Returns LDClient

    The new client instance.

Generated using TypeDoc