Skip to content

docs: Quickstart npm snippet wraps AffitorProvider in a client component - #145

Merged
sonpiaz merged 2 commits into
mainfrom
docs/quickstart-npm-client
Oct 16, 2026
Merged

sonpiaz merged 2 commits into
mainfrom
docs/quickstart-npm-client

Conversation

@sonpiaz

@sonpiaz sonpiaz commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

What changed

The Quickstart snippet (setup-program.mdx lines 89-103) now wraps <AffitorProvider> in a client-component Providers, the pattern already used on the click-tracking page. Text change only.

Why

A tracking install check found the old snippet put <AffitorProvider> straight in app/layout.tsx; on @affitor/sdk 2.1.2 that fails next build (createContext is not a function). The Providers pattern works on every SDK version (2.1.3 adds "use client" to the React entry, Affitor/sdk#4, unpublished).

How verified

Reproduced the failing next build with the old snippet on SDK 2.1.2; the wrapped pattern is the one already documented on the click-tracking page.

🤖 Generated with Claude Code

…mponent

The snippet rendered AffitorProvider directly in app/layout.tsx, which fails
next build on @affitor/sdk 2.1.2 (layout.tsx is a Server Component). It now
uses the same client-component Providers pattern as the click-tracking page,
which works on every SDK version, and names the Pages Router alternative.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
affitor-docs Ready Ready Preview Oct 16, 2026 7:27am UTC

Request Review

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonpiaz
sonpiaz merged commit 07561b3 into main Oct 16, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 5242b14b Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant