This site contains usage examples for @happykit/flags
.
Read the README.md file for a full technical setup before you jump into these examples. The examples are intended as reference implementations for the different ways in which the @happykit/flags
client can be used.
Make sure you have set up configure()
inside of _app.js
before continuing with these examples.
Boxes like the one below show the return value of the useFlags()
hook. If you do this in your code
const flagBag = useFlags()
then the value of flagBag
would be something like
Render #1 (Current render){ flags: null, data: null, error: null, fetching: true, visitorKey: "example-visitor-key", settled: false }
We usually call this value the flagBag
, as it contains the evaluated feature flags and a bunch of other things you might need.