You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vue 3 plugin that provides an easy way to manage feature flags in your Vue application using Azure App Configuration. This plugin allows you to use feature flags and toggling in different environments.
3
+
Vue 3 plugin that provides an easy way to manage feature flags in your Vue 3 application using Azure App Configuration. This plugin allows you to use feature flags and toggle different environments.
To use vue3-app-configuration, you need to initialize it in your main Vue application file, typically main.ts or main.js.
13
+
To use vue3-app-configuration, you need to initialize it in your main application file, typically main.ts or main.js.
14
14
15
15
```ts
16
16
import { createApp } from"vue";
@@ -27,57 +27,42 @@ app.use(
27
27
app.mount("#app");
28
28
```
29
29
30
-
Replace 'your-azure-configuration-readonly-connection-string' with your actual connection string.
30
+
Replace 'your-azure-configuration-readonly-connection-string' with your actual connection string. You can use this guide for refence [Feature Flags in Vue with Azure App Configuration](https://www.tvaidyan.com/2022/07/14/feature-flags-in-vue-with-azure-app-configuration).
31
31
32
32
## Using in Vue Components
33
33
34
-
You can use the `vue3-app-configuration` plugin in your Vue components in two ways: using a non-reactive method for a one-time check or a reactive method for ongoing checks and shorter code.
34
+
You can use the `vue3-app-configuration` plugin in your Vue components in two ways: using a async non-reactive method or a reactive method.
35
35
36
36
### Non-Reactive Usage
37
37
38
-
For a one-time check of the feature flag, you can use the `getFeatureFlag` method. This is useful when you need to check the feature flag status once, such as on component mount.
<pv-if="isFeatureEnabled">This feature is enabled!</p>
60
-
<pv-else>This feature is disabled.</p>
61
-
</template>
62
52
```
63
53
64
54
### Reactive Usage
65
55
66
-
For ongoing checks where you want the component to reactively update based on the feature flag status, use the getFeatureFlagReactive method. This returns a Vue ref and features a shorter code snippet.
0 commit comments