Перейти к основному содержимому
Этот контент пока недоступен на вашем языке и отображается на английском.

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.

Резюме ИИ

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, …). Предполагается, что репозиторий соответствует формату agentskills.io.

7 months ago
90 stars
MIT
Обновлено 2 days ago
Посмотреть исходный код