Skip to content
Agentmart
Submit a tool

server-components

React Server Components, Suspense boundaries, streaming SSR, partial prerendering patterns for Next.js App Router.

Skill by vibeeval

IndexedMIT★ 540
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/vibeeval-server-components

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

React Server Components, Suspense boundaries, streaming SSR, partial prerendering patterns for Next.js App Router.

Use cases: frontend, backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/server-components

What's inside

Skill name
server-components
Description
React Server Components, Suspense boundaries, streaming SSR, partial prerendering patterns for Next.js App Router.
License
MIT
Instructions
323 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# React Server Components

RSC + Next.js App Router patterns for streaming, caching, and minimal client JS.

## RSC vs Client Components Decision Matrix

```
Use Server Component (default) when:
  - Fetching data from DB / API
  - Accessing backend resources (filesystem, secrets)
  - No interactivity (useState, useEffect, event listeners)
  - Heavy dependencies (no bundle cost)

Use Client Component ("use client") when:
  - useState / useReducer / useRef
  - useEffect / lifecycle hooks
  - Browser APIs (window, navigator, IntersectionObserver)
  - Event listeners (onClick, onChange)
  - Third-party client libraries (charts, drag-drop)

Rule: Push "use client" as LOW in the tree as possible.
```

## "use client" / "use server" Directives

```typescript
// app/dashboard/page.tsx — Server Component (no directive needed)
import { db } from '@/lib/db'
import { StatsCounter } from './stats-counter' // client component

export default async function DashboardPage() {
  const stats = await db.query.stats.findMany()
  // Can pass serializable props to client components
  return <StatsCounter initialCount={stats.length} />
}

// app/dashboard/stats-counter.tsx — Client Component
'use client'
import { useState } from 'react'

export function StatsCounter({ initialCount }: { initialCount: number }) {
  const [count, setCount] = useState(initialCount)
  return <button onClick={() => setCount(c => c + 1)}>{count}</button>
}

// Server Action in separate file
// app/actions.ts
'use server'
export async function createItem(formData: FormData) {
  // runs on server, called from client
}
```

## Suspense Boundary Placement Strategy

```typescript
// Place Suspense around slow data — fast data renders immediately
export default async function Page() {
  const fastData = await db.query.config.findFirst()   // fast: cached

  return (
    <div>
      <Header config={fastData} />                      {/* instant */}

      <Suspense fallback={<StatsSkeleton />}>
        <SlowStats />                                   {/* streams in */}
      </Suspense>

      <Suspense fallback={<FeedSkeleton rows={5} />}>
        <ActivityFeed />                                {/* streams in */}
      </Suspense>
    </div>
  )
}

async function SlowStats() {
  const stats = await fetch('/api/stats', { cache: 'no-store' })
    .then(r => r.json())
  return <StatsGrid stats={stats} />
}
```

## Streaming SSR with loading.tsx

```
app/
  dashboard/
    page.tsx        ← async server component (data fetching)
    loading.tsx     ← shown while page.tsx is streaming
    error.tsx       ← shown if page.tsx throws
    layout.tsx      ← wraps all, always renders immediately
```

```typescript
// app/dashboard/loading.tsx — instant skeleton, no async needed
export default function Loading() {
  return (
    <div className="animate-pulse space-y-4">
      <div className="h-8 bg-gray-200 rounded w-1/3" />
      <div className="grid grid-cols-3 gap-4">
        {Array.from({ length: 3 }).map((_, i) => (
          <div key={i} className="h-24 bg-gray-200 rounded" />
        ))}
      </div>
    </div>
  )
}
```

## Partial Prerendering (PPR)

```typescript
// next.config.ts — enable PPR (Next.js 14+)
export default {
  experimental: { ppr: true },
}

// page.tsx — static shell + dynamic holes
import { Suspense } from 'react'

From vibeeval/vibecosystem, MIT.

More from vibeeval/vibecosystem

Signals

Stars
540
Forks
44
Open issues
5
Last commit (this folder)
Mar 14, 2026 (7 months ago)
Last release
Apr 12, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from vibeeval

Cite this page

server-components skill. Agent Mart. https://agentmart.dev/skills/vibeeval-server-components (last updated 2026-10-24)