Const 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.
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
Vue plugin that creates a LaunchDarkly client and provides it app-wide.
By default the client starts immediately. Pass
deferInitialization: truein options to opt out of auto-start and callclient.start()yourself via useLDClient.