You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/analyze-project/SKILL.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -495,7 +495,9 @@ EDUCATE:
495
495
496
496
**React/Next.js gotchas:**
497
497
498
-
- Next.js App Router: use `ConfidenceProvider` in the root layout. Server Components use `getFlag('flag.prop', default, context)`; Client Components use the `useFlag('flag.prop', default)` hook. If using the client provider, the rendering file must be a Client Component — extract into `providers.tsx` with `"use client"` if needed.
498
+
- When possible, avoid `@spotify-confidence/react`, `@spotify-confidence/sdk`, or `@openfeature/react-sdk` — these are being phased out. Use `@spotify-confidence/openfeature-server-provider-local` which evaluates flags locally via WebAssembly.
499
+
- Import `ConfidenceProvider` and `getFlag` from `@spotify-confidence/openfeature-server-provider-local/react-server`. Import `useFlag` from `@spotify-confidence/openfeature-server-provider-local/react-client`.
500
+
- Next.js App Router: use `ConfidenceProvider` in the root layout with an evaluation context. Server Components use `getFlag('flag.prop', default, context)` (async). Client Components use the `useFlag('flag.prop', default)` hook and require a `'use client'` directive — extract into `providers.tsx` if needed.
499
501
- Never call `useFlag` in a Server Component — use `getFlag` or wrap in a Client Component.
500
502
- Place the provider above any `<Suspense>` boundary.
When possible, avoid `@spotify-confidence/react`, `@spotify-confidence/sdk`, and `@openfeature/react-sdk` — these are being phased out. For event tracking in React / Next.js apps, use the server provider's built-in logging; if you need `confidence.track()`, install `@spotify-confidence/sdk` solely for that purpose.
377
378
378
379
**Initialize the SDK** at the app's entry point. For server-side Node.js/Next.js:
0 commit comments