Feature Flags in NuxtJS SSR Apps

Feature flag service supporting Server-Side Rendered (SSR) applications.

What are feature flags?

Essentially feature flags are toggles or switches that control your application's behavior. They are a little bit like bool values in an ordinary config file. Normally an application has a way of execution. However using feature flags this line of execution changes based on feature flag values.

Switch on

Switch off

For example a feature flag called `isMyAwesomeFeatureEnabled` controls wether a part of your application is activated or not. Instead of storing there flags in a local config file, a feature flag service can provide these values for your application on the fly without the need to re-deploy the application each time a flag is changed.

How to access feature flags in a NuxtJS application?

After creating a client with your SDK Key, you just need to call a getValue() on the client whenever you need your feature flag. The value is served from a local cache, no need to worry about performance or response times.

import * as ConfigCat from "configcat-js-ssr";

const client = ConfigCat.createClient(
    "PKDVCLf-Hq-h-kCzMp-L7Q/HhOWfwVtZ0mb30i9wi17GQ" // Your SDK Key
);

export default Vue.extend({
    components: { Logo },
    data: () => {
        return { isAwesomeFeatureEnabled: false };
    },
    methods: {
        checkAwesome() {
            client.getValue("isAwesomeFeatureEnabled", false, value => {
                this.isAwesomeFeatureEnabled = value;
            });
        }
    }
});

Get started

Use cases

Laptop with a two colored image illustrating canary releases.

Canary Releases, Phased Roll-outs

Testing a new feature on 1%, 5%, 10% of your user base saves the company's reputation in the long term. Turning it up to 100% when everyone is confident.

Laptop with four versions of the same image illustrating AB testing.

A/B Testing crazy ideas on real users

Feature toggle driven A/B/n testing on real users enables you to test new theories and get instant feedback on which way to continue.

Cat pointing to a pie diagramm on a whiteboard.

User Targeting

Target users based on region, email or any attribute and build segments or groups as needed. With ConfigCat Targeting, you have full control over who sees what at any given time.

Sign up   or   Book a demo
Cat thinking about a can of dog food.

Dogfooding, Internal Testing

Eating your own dog food, aka releasing a feature to a specified group of users like colleagues or early adopters and getting feedback in time helps to maintain your product's reputation by releasing high-quality software.

Cat with a switch and a nuclear logo.

Emergency Kill Switch

Separating releases from deployments, lets you turn features ON right when you need them even on Friday. Because if something goes wrong, you will turn them OFF instantly without re-deploying your code.

Five cats flipping a switch together.

Team Collaboration

Sharing the control over feature flags with team members is a great way to collaborate and an opportunity for you to avoid being a bottleneck.

Sign up   or   Book a demo
Cat with a chat cloud