This demo shows how to use @happykit/flags
for targeting users.
HappyKit allows you to do pass in a user. You can use that user and the provided uesr profile for rules or percentage-based rollouts. The fields supported in the user profile are defined in the README and in the TypeScript types.
Render #2 (Current render){ flags: {}, data: null, error: "response-not-ok", fetching: true, settled: true, visitorKey: "lVoWajY8ihWXqC2rGkjII" }
History (1)
Previous return values of the
useFlags()
hook.Render #1{ flags: {}, data: null, error: "response-not-ok", fetching: false, settled: true, visitorKey: "lVoWajY8ihWXqC2rGkjII" }
Note that aside from users, HappyKit also has the concepts of a visitor and traits. These three concepts are all independent of each other.