This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
HappyKit has a feature called visitorKey, you can learn more about it here. If you want to use this feature with App Router you need to set the cookie from middleware using the ensureVisitorKeyCookie from @happykit/flags/edge. See the example/middleware.ts file in this repository for an example of how to do this. This is necessary as App Router pages can not set any cookies when they render, so we have to fall back to setting the cookie from middleware instead. If you do not need the visitorKey for your custom evaluation rules or rollouts then you do not need to set the cookie from middleware.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@happykit/flags@3.2.0
Minor Changes
e473304: add Next.js App Router support
HappyKit has a feature called
visitorKey
, you can learn more about it here. If you want to use this feature with App Router you need to set the cookie from middleware using theensureVisitorKeyCookie
from@happykit/flags/edge
. See theexample/middleware.ts
file in this repository for an example of how to do this. This is necessary as App Router pages can not set any cookies when they render, so we have to fall back to setting the cookie from middleware instead. If you do not need thevisitorKey
for your custom evaluation rules or rollouts then you do not need to set the cookie from middleware.example@0.1.6
Patch Changes