Flags-Kit
Type-safe feature flags for TypeScript and React.
What It Is
flags-kit is a code-first feature flag system.
You define:
- context types
- segments
- flags
Then you evaluate them in process through the current adapter and consume them through the React SDK.
For most React apps, @flagkit/react is the only package you need to install directly.
Packages
| Package | Purpose |
|---|---|
@flagkit/core | Types plus createFlag and createSegment |
@flagkit/internal-adapter | The current in-process evaluator |
@flagkit/react | React bindings for your app |
Install
bash
pnpm add @flagkit/reactFlow
- Define your app context.
- Define reusable segments.
- Define flags.
- Create the React SDK.
- Use
useFlaganduseSetContextin components.