Giter Site home page Giter Site logo

flags's Introduction


 

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

  • written for Next.js
  • integrate using a simple useFlags() hook
  • only 2 kB gzipped size
  • extremely fast flag responses (~50ms)
  • supports server-side rendering and static site generation
  • supports middleware and edge functions
  • supports user targeting, custom rules and rollouts

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.

flags's People

Contributors

dependabot[bot] avatar dferber90 avatar github-actions[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.