Skip to content
Dashboard

Declaring feature flags in code

import { unstable_flag as flag } from "@vercel/flags/next"
const showSummerSale = flag({
key: "summer-sale",
decide: async () => false
})

Declaring a feature flag

export const showSummerSale = flag<boolean>({
key: 'summer-sale',
async decide() {
return getLaunchDarklyClient().variation(this.key, false);
},
});

Using a feature flag