الانتقال إلى المحتوى الرئيسي
هذا المحتوى غير متوفر بعد بلغتك ويتم عرضه باللغة الإنجليزية.

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
تم التحديث في 6 days ago
عرض الكود المصدري