1 min read
The Flags SDK is a library that gives developers tools to use feature flags in Next.js and SvelteKit applications.
The Flags SDK version 3.0 adds:
Pages Router support so feature flags can be used in App Router and Pages Router
New adapters architecture that allows the SDK to integrate with various data sources and feature flag providers
A new
identify
concept that allows you to establish an evaluation context for your feature flags. With this addition, you can tailor flags and experiments for individual users or groups
import { flag } from '@vercel/flags/next';
export const exampleFlag = flag({ key: 'identify-example-flag', identify() { return { user: { id: 'user1' } }; }, decide({ entities }) { return entities?.user?.id === 'user1'; },});
First-class support for an evaluation context allows decoupling the identifying step from the decision making step.
With this release, the repository is now open source and under the MIT License, providing more transparency and allowing for community contributions and integrations.
Check out the new Flags SDK documentation with updated examples to learn more.