Vai al contenuto principale
Questo contenuto non è ancora disponibile nella tua lingua ed è mostrato in inglese.

Next.js Server vs. Client Components

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

Riepilogo IA

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.

Installazione

npx skills add wsimmonds/claude-nextjs-skills

Esegue la CLI skills di Vercel (skills.sh) tramite npx — richiede Node.js in locale e almeno un agente compatibile con skills installato (Claude Code, Cursor, Codex, …). Presuppone che il repository segua il formato agentskills.io.

7 months ago
90 stars
MIT
Aggiornato il 2 days ago
Vedi il codice sorgente