Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

react-server-components

/react-server-components

Pomaga budować aplikacje React z Server Components, które ograniczają JavaScript po stronie klienta i strumieniują dane.

Licencja
MIT
Ostatnia zmiana repozytorium
28.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 28.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pomaga budować aplikacje React z Server Components, które ograniczają JavaScript po stronie klienta i strumieniują dane.

Oryginalny opis (EN)

Use this skill when building modern React applications utilizing React Server Components (RSC) to reduce client JavaScript and stream data.

Jak działa

  1. When to use
  2. Prerequisites
  3. Step-by-step workflow
  4. Commands / code examples
  5. Common mistakes & pitfalls
  6. Verification checklist
  7. Related skills
Sekcje z nagłówków SKILL.md, w oryginale · 66 linii, 347 słów
Podgląd SKILL.md
---
name: react-server-components
description: Use this skill when building modern React applications utilizing React Server Components (RSC) to reduce client JavaScript and stream data.
---
# React Server Components

## When to use
Use this skill when building data-heavy web applications with Next.js or React 19, where minimizing client bundle size and accessing backend resources directly is essential.

## Prerequisites
- Node.js 18.17+ and Next.js 14+ or an RSC-compatible bundler.
- Understanding the boundary between server execution and client hydration.

## Step-by-step workflow
1. **Establish component boundaries**: Default all components to Server Components. Add `'use client'` only when interactive event handlers or hooks are required.
2. **Fetch data directly in components**: Use async/await directly in Server Components to query databases or internal services without client waterfalls.
3. **Keep client bundles minimal**: Pass server data down to Client Components as serializable props (strings, numbers, plain objects).
4. **Leverage streaming with Suspense**: Wrap asynchronous Server Components in `<Suspense fallback={<Skeleton />}>` to stream UI chunks.
5. **Handle mutations via Server Actions**: Use `'use server'` functions for form submissions and database mutations.

## Commands / code examples
```tsx
// app/users/page.tsx (Server Component)
import { Suspense } from 'react';
import UserList from './UserList';
import UserListSkeleton from './UserListSkeleton';

export default async function UsersPage() {
  return (
    <main className="p-6">
      <h1 className="text-2xl font-bold mb-4">Team Directory</h1>
      <Suspense fallback={<UserListSkeleton />}>
        <UserList />
      </Suspense>
    </main>
  );
}

// app/users/UserList.tsx
async function UserList() {
  const res = await fetch('https://api.example.com/users', { next: { revalidate: 60 } });
  const users: Array<{ id: string; name: string }> = await res.json();

  return (
    <ul className="divide-y">
      {users.map((user) => (
        <li key={user.id} className="py-2">{user.name}</li>
      ))}
    </ul>
  );
}
```

## Common mistakes & pitfalls
- Adding `'use client'` at the root layout, effectively disabling Server Components across the app.
- Passing non-serializable values (functions, class instances, symbols) across the server-client boundary.
- Leaking private environment variables or API keys through Client Component props.

## Verification checklist
- [ ] Data-fetching components run exclusively on the server.
- [ ] `'use client'` is pushed down to leaf interactive components only.
- [ ] Async components are wrapped with `<Suspense>` boundaries.
- [ ] Sensitive backend credentials remain isolated on the server.

## Related skills
- nextjs-app-router
- react-fundamentals
- server-sent-events-sse
- web-vitals-lcp-cls-inp-optimization

Wersje

RepozytoriumWynikLicencja
Ta strona · nextboxis/library-skill-agents100MIT
j4flmao/agent-skills100MIT
claude-dev-suite/claude-dev-suite100MIT
chrishuffman5/domain-expert100MIT
Thisisjuke/skills90MIT

Migawka bazy z 13.11.2026 · wersja paczki bd68cb5a2d1d (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100react-server-components-framework
    Pomaga budować aplikacje Next.js 16+ z React Server Components: App Router, Cache Components, streaming SSR, Server Actions i wzorce React 19.
  • 100server-components
    Doradza przy architekturze React Server Components w Next.js: Server i Client Components, dyrektywa use client, wybór między serwerem a klientem, kompozycja komponentów i pobieranie danych.
  • 100react-rsc
    Pomaga rozdzielić komponenty serwerowe i kliencie w React Server Components, debugować błędy hydracji i migrować do App Router.
  • 100frontend-react
    Wspiera tworzenie aplikacji React z Next.js, React Server Components, Tailwind CSS i shadcn/ui oraz złożonym zarządzaniem stanem.
  • 100frontend-react
    Wspiera tworzenie aplikacji React z Next.js, React Server Components, Tailwind CSS i shadcn/ui oraz obsługę złożonego zarządzania stanem.
  • 100react
    Wspiera pracę z React 19: Server Components, hooki, optymalizacje kompilatora i funkcje współbieżne w nowoczesnych interfejsach webowych i aplikacjach SPA.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.