happykit / flags

⛳️ Feature Flags for Next.js
https://happykit.dev
MIT License
1.01k stars 11 forks source link
feature-flags feature-toggles nextjs react reactjs

Documentation  •  Examples  •  Full Tutorial  •  happykit.dev  •  @happykitdev


 

Add Feature Flags to your Next.js application with a single React Hook. This package integrates your Next.js application with HappyKit Flags. Create a free happykit.dev account to get started.

Key Features


Want to see a demo? HappyKit Flags Demo


Documentation

See the full documentation for setup instructions and usage guides.

Examples

This is roughly what the usage of feature flags looks like once you're up and running.

// pages/index.js
import { useFlags } from "flags/client";

export default function IndexPage(props) {
  const flagBag = useFlags();

  return flagBag.flags.greeting === "dog" ? "Who's a good boye" : "Hello";
}

The self documenting examples at flags.happykit.dev show how to use @happykit/flags for client-side, static and server-side rendering.

Full Tutorial

A full tutorial including setup instructions is published on frontend-digest.com.