github-actions
released this
03 Jun 15:17
·
9 commits
to master
since this release
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.