Next.js
@flagctl/next — FlagBoundary, streaming client, sticky bucketing.
Install
pnpm add @flagctl/next
FlagBoundary
import { FlagBoundary } from '@flagctl/next';
export default function Page() {
return (
<FlagBoundary flag="checkout.v2" fallback={<OldCheckout />}>
<NewCheckout />
</FlagBoundary>
);
}Evaluates on the server. Streams the on-branch only — clients never receive the off-branch markup.
Sticky bucketing
@flagctl/next reads the user identity from a configurable source (cookie, header, session) and hashes it with the flag key to assign a sticky bucket per percent rollout.