react-server-components

Implement React Server Components in Next.js App Router with server/client boundaries.

1|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/yahav123147/paid-ads-cro-skills --skill react-server-components-yahav123147
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-server-components
Source: https://github.com/yahav123147/paid-ads-cro-skills/tree/main/skills/react-server-components
Command: npx skills add https://github.com/yahav123147/paid-ads-cro-skills --skill react-server-components-yahav123147

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps developers correctly implement React Server Components (RSC) in the Next.js App Router so apps fetch data on the server, stream UI progressively, and only ship client-side JavaScript when interactivity is required.

Core Features & Use Cases

  • Server vs client component boundaries: Use server components by default for data fetching and sensitive logic, and add 'use client' only for interactive UI.
  • Data fetching patterns: Fetch directly in server components, use parallel requests with Promise.all, and handle dependent fetches sequentially.
  • Streaming and performance optimization: Add Suspense boundaries with loading skeletons to stream sections independently and minimize client bundle size.
  • Server actions for mutations: Implement form submissions via server actions (including useActionState patterns) with revalidation after updates.
  • Common implementation safety: Ensure authentication checks in layouts, properly pass serializable server data to client components, and colocate fetching where it’s used.

Quick Start

Implement React Server Components in Next.js App Router by running server-side data fetching in server components, using client components only where interactivity is needed, and adding Suspense streaming with loading skeletons for each streamed section.

Frequently Asked Questions about react-server-components

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I correctly define server and client component boundaries in Next.js App Router?

To define component boundaries in Next.js App Router, use server components by default for data fetching and sensitive logic, and add the 'use client' directive only when interactive UI requires event handling or hooks. This minimizes client bundle size.

How do I implement streaming dashboards with Suspense in Next.js?

You implement streaming dashboards with Suspense in Next.js by wrapping independently loading UI sections in Suspense boundaries. This progressively streams server-rendered sections to the client alongside loading skeletons, improving perceived performance.

What's the best way to fetch data in parallel and sequentially in React Server Components?

The best way to fetch data in React Server Components is directly within server components. Use Promise.all for parallel requests to minimize waterfalls, and handle dependent fetches sequentially where one request relies on another's output.

How do I use server actions with useActionState for form mutations in Next.js?

To use server actions for form mutations in Next.js, implement the useActionState pattern for submissions. Trigger data revalidation after updates via fetch options or tags to refresh cached server data without manual client-side syncing.

How should I pass data from server components to client components in Next.js?

To pass data from server components to client components in Next.js, ensure the server data is fully serializable. Pass only serializable props across the server-client boundary to maintain safe composition and prevent hydration errors.

Do I need to add authentication checks in server components or layouts?

You should add authentication checks in server components and Next.js layouts to protect sensitive logic. Keeping authentication server-side ensures secure access control before rendering pages and prevents exposing sensitive logic to the client.