Variable LDVuePluginConst

LDVuePlugin: {
    install(app, options) => void;
} = ...

Vue plugin that creates a LaunchDarkly client and provides it app-wide.

By default the client starts immediately. Pass deferInitialization: true in options to opt out of auto-start and call client.start() yourself via useLDClient.

Type declaration

Remarks

Because the plugin provides the client at the app level it cannot gate rendering via slots. Use useInitializationStatus to react to the initialization state, or prefer createLDProvider when slot-based gating is needed.

Example

import { createApp } from 'vue';
import { LDVuePlugin } from '@launchdarkly/vue-client-sdk';
import App from './App.vue';

createApp(App)
.use(LDVuePlugin, {
clientSideID: 'your-client-side-id',
context: { kind: 'user', key: 'user-key' },
})
.mount('#app');

Generated using TypeDoc