メインコンテンツへスキップ
このコンテンツはお使いの言語にまだ対応していないため、英語で表示されています。

Next.js Server vs. Client Components

Skill 検証済み
98

Guide for choosing between Server Components and Client Components in Next.js App Router. CRITICAL for useSearchParams (requires Suspense + 'use client'), navigation (Link, redirect, useRouter), cookies/headers access, and 'use client' directive. Activates when prompt mentions useSearchParams, Suspense, navigation, routing, Link component, redirect, pathname, searchParams, cookies, headers, async components, or 'use client'. Essential for avoiding mixing server/client APIs.

AI サマリー

This skill provides detailed explanations and code examples for differentiating between Next.js Server and Client Components. It covers critical patterns like data fetching, hook usage, navigation, and the React 'use' API, along with common anti-patterns to avoid.

インストール

npx skills add wsimmonds/claude-nextjs-skills

Vercel skills CLI(skills.sh)を npx 経由で実行します。ローカルに Node.js と、skills 対応のエージェント(Claude Code、Cursor、Codex など)が少なくとも 1 つインストールされている必要があります。リポジトリが agentskills.io 形式に従っていることを前提としています。

7 months ago
90 stars
MIT
5 days ago に更新
ソースコードを表示