@launchdarkly/react-native-client-sdk - v10.23.2
    Preparing search index...

    Interface LDPluginBase<TClient, THook>

    Interface for plugins to the LaunchDarkly SDK.

    This is the base interface common to client-side and server-side SDKs. This interface should be re-exported by SDKs using the specific SDK's client type for the TClient parameter, and the specific SDK's hook type for the THook parameter.

    interface LDPluginBase<TClient, THook> {
        getHooks?(metadata: LDPluginEnvironmentMetadata): THook[];
        getMetadata(): LDPluginMetadata;
        register(
            client: TClient,
            environmentMetadata: LDPluginEnvironmentMetadata,
        ): void;
    }

    Type Parameters

    • TClient
    • THook

    Hierarchy (View Summary)

    Index
    • Gets a list of hooks that the plugin wants to register.

      This method will be called once during SDK initialization before the register method is called.

      If the plugin does not need to register any hooks, this method doesn't need to be implemented.

      Parameters

      Returns THook[]

    • Get metadata about the plugin.

      Returns LDPluginMetadata

    • Registers the plugin with the SDK. Called once during SDK initialization.

      The SDK initialization will typically not have been completed at this point, so the plugin should take appropriate actions to ensure the SDK is ready before sending track events or evaluating flags.

      Parameters

      Returns void