Background: I'm experiencing an issue with the Fla...
# ask-questions
a
Background: I'm experiencing an issue with the Flags Explorer setup in Next.js where the
getProviderData()
function from
@flags-sdk/growthbook
doesn't seem to be mapping flag options from experiment variations tied to that flag in growthbook. There's a discrepancy between two different documentation approaches for next.js + vercel flags explorer: 1. Next.js and Vercel Feature Flags Tutorial - manual implementation of
getFlagApiData()
that explicitly loops through the GrowthBook payload to extract options from rules, variations, and force values. (older) 2. Next.js SDK (Vercel Flags) Documentation - Uses the built-in
getProviderData()
function from
@flags-sdk/growthbook
package, which should handle this automatically. (new) Issue: When using the SDK's
getProviderData()
function as shown in the newer docs, the flags appear in the toolbar with the default as their only option. Question: Is this a known limitation of
getProviderData()
, or did I miss something in the docs?
👀 1
s
Hey Spencer. I'm not sure about this offhand. I'll need to spin up an instance to debug. The second option/docs are newer, fwiw. One thing to note is that you don't have to use the flags SDK with Next.js. We have some other examples on integrating GrowthBook with Next here: https://github.com/growthbook/examples/tree/main/next-js