Ir al contenido principal
Este contenido aún no está disponible en tu idioma y se muestra en inglés.

Next.js Server vs. Client Components

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

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

Instalación

npx skills add wsimmonds/claude-nextjs-skills

Ejecuta el CLI de skills de Vercel (skills.sh) mediante npx — requiere Node.js en local y al menos un agente compatible con skills instalado (Claude Code, Cursor, Codex, …). Asume que el repositorio sigue el formato de agentskills.io.

7 months ago
90 stars
MIT
Actualizado el 2 days ago
Ver código fuente