Przejdź do głównej treści
Ta treść nie jest jeszcze dostępna w Twoim języku i jest wyświetlana po angielsku.

Next.js Server vs. Client Components

Skill Zweryfikowano
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.

Podsumowanie 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.

Instalacja

npx skills add wsimmonds/claude-nextjs-skills

Uruchamia Vercel skills CLI (skills.sh) przez npx — wymaga lokalnego Node.js oraz co najmniej jednego zainstalowanego agenta zgodnego ze skills (Claude Code, Cursor, Codex, …). Zakłada, że repozytorium jest zgodne z formatem agentskills.io.

7 months ago
90 stars
MIT
Zaktualizowano 2 days ago
Zobacz kod źródłowy