This demo shows how to use @happykit/flags
for server-rendered pages.
Since this page is rendered on the server only, there is no flagBag
. Instead, the values are shown directly.
Flags{ ads: true, checkout: "medium", discount: 5, purchaseButtonLabel: "Get it" }
Aside from the flags, we have access to the loaded flags as well. These are the flags without any fallback values.
Loaded data (without fallback values){ flags: { ads: true, checkout: "medium", discount: 5, purchaseButtonLabel: "Get it" }, resolvedVariantIds: { ads: "on", checkout: "off", discount: "on", purchaseButtonLabel: "1617982711642" }, visitor: { key: "FyKxk9mP-J7CgxSmMtSmS" } }