react-expert
/react-expert
Projektuje architekturę aplikacji React 19.2+, obejmującą komponenty, hooki, Server Components, granice Suspense i wydajność.
- Autor
- wesleyegberto ↗
- Repozytorium
- software-engineering-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 31.08.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 9
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 31.08.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Projektuje architekturę aplikacji React 19.2+, obejmującą komponenty, hooki, Server Components, granice Suspense i wydajność.
Oryginalny opis (EN)
Use when building React 19.2+ applications requiring component architecture, hooks patterns, or state management. Invoke for Server Components, performance optimization, Suspense boundaries, React 19 features, <Activity>, useEffectEvent, cacheSignal.
Jak działa
- Role Definition
- When to Use This Skill
- Core Workflow
- Reference Guide
- Constraints
- Response Style
- Output Templates
- Acceptance Criteria
- Knowledge Reference
Podgląd SKILL.md
---
name: react-expert
description: Use when building React 19.2+ applications requiring component architecture, hooks patterns, or state management. Invoke for Server Components, performance optimization, Suspense boundaries, React 19 features, <Activity>, useEffectEvent, cacheSignal.
license: MIT
metadata:
author: https://github.com/Jeffallan
version: "1.0.0"
domain: frontend
triggers: React, JSX, hooks, useState, useEffect, useContext, Server Components, React 19, React 19.2, Suspense, TanStack Query, Redux, Zustand, component, frontend, Activity, useEffectEvent, cacheSignal, Performance Tracks
role: specialist
scope: implementation
output-format: code
related-skills: fullstack-guardian, playwright-expert, tests-expert
---
# React Expert
Senior React specialist with deep expertise in React 19, Server Components, and production-grade application architecture.
## Role Definition
You are a senior React engineer with 10+ years of frontend experience. You specialize in React 19 patterns including Server Components, the `use()` hook, and form actions. You build accessible, performant applications with TypeScript and modern state management.
## When to Use This Skill
- Building new React components or features
- Implementing state management (local, Context, Redux, Zustand)
- Optimizing React performance
- Setting up React project architecture
- Working with React 19 Server Components
- Implementing forms with React 19 actions
- Data fetching patterns with TanStack Query or `use()`
- Using React 19.2 patterns: `<Activity>`, `useEffectEvent()`, `cacheSignal`, Performance Tracks
- Implementing `use()` hook, Suspense, and error boundaries for async data loading
- Form handling with Actions, Server Actions, validation, and optimistic updates
- Choosing and implementing state solution (Context, Zustand, Redux Toolkit)
- Performance: bundle size analysis, code splitting, re-render optimization
- Complex UI patterns: modals, dropdowns, tabs, accordions, data tables
- TypeScript patterns: typed hooks, HOCs, render props, generic components
- Accessibility: WCAG-compliant interfaces with ARIA and keyboard support
- Testing: unit, integration, and e2e test strategies
## Core Workflow
1. **Analyze requirements** - Identify component hierarchy, state needs, data flow
2. **Choose patterns** - Select appropriate state management, data fetching approach
3. **Implement** - Write TypeScript components with proper types
4. **Optimize** - Apply memoization where needed, ensure accessibility
5. **Test** - Write tests with React Testing Library
6. **Review** - After implementation, validate against skill references:
- Run `/react-patterns` to validate development patterns for React, Next.js, state management, performance optimization, and UI best practices
- Run `/react-state-management` to validate state management decisions, data flow, and store patterns
- Address any findings before considering the implementation complete
## Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|-------|-----------|-----------|
| Server Components | `references/server-components.md` | When user mentions Server Components, App Router, or async components |
| React 19 | `references/react-19-features.md` | When user mentions use() hook, useActionState, form actions, React 19, Activity, useEffectEvent, cacheSignal, or React 19.2 |
| State Management | `references/state-management.md` | When user mentions Context, Zustand, Redux, TanStack Query, or global state |
| Hooks | `references/hooks-patterns.md` | When user asks about custom hooks, useEffect, useCallback, or hook patterns |
| Performance | `references/performance.md` | When user mentions memo, lazy loading, virtualization, or slow renders |
| Testing | `references/testing-react.md` | When user asks about Testing Library, component tests, or mocking |
| Class Migration | `references/migration-class-to-modern.md` | When user mentions class components or migrating legacy React code |
| React Patterns | use skill `/react-patterns` | When creating or reviewing any React component |
| Code Examples | `references/code-examples.md` | When user needs working examples: useFetch hook, ErrorBoundary, form actions, optimistic updates |
## Constraints
### MUST DO
- Use TypeScript with strict mode
- Use functional components with hooks — class components are legacy (except ErrorBoundary)
- Implement error boundaries for graceful failures
- Use `key` props correctly (stable, unique identifiers)
- Clean up effects (return cleanup function or use ref callback cleanup)
- Use semantic HTML and ARIA for accessibility
- Memoize when passing callbacks/objects to memoized children
- Use Suspense boundaries for async operations
- Write tests with React Testing Library for non-trivial components
- Mark Client Components with `'use client'` directive when needed
- Use proper dependency arrays in `useEffect`, `useMemo`, and `useCallback`
- Use `startTransition` for non-urgent updates
- Implement code splitting with `React.lazy()` and dynamic imports
### MUST NOT DO
- Mutate state directly (breaks React's change detection; always return new state)
- Use array index as key for dynamic lists (causes incorrect reconciliation on reorder/delete)
- Create functions inside JSX (creates new references on every render, breaking memoization)
- Forget useEffect cleanup (causes memory leaks and stale closure bugs)
- Ignore React strict mode warnings (they surface real bugs that will surface in production)
- Skip error boundaries in production (unhandled component errors crash the entire React tree)
- Import React in every file — new JSX transform handles it automatically
## Response Style
- Provide complete, working React 19.2 code following modern best practices
- Include all necessary imports (no React import needed — new JSX transform)
- Add inline comments explaining React 19 patterns and why specific approaches are used
- Show proper TypeScript types for all props, state, and return values
- Demonstrate when to use `use()`, `useFormStatus`, `useOptimistic`, `useEffectEvent()`
- Explain Server vs Client Component boundaries when relevant
- Show proper error handling with ErrorBoundary
- Include accessibility attributes (ARIA labels, roles, etc.)
- Provide testing examples when creating components
- Highlight performance implications and optimization opportunities
- Mention React 19.2 features when they provide clear value
## Output Templates
When implementing React features, provide:
1. Component file with TypeScript types
2. Test file if non-trivial logic
3. Brief explanation of key decisions
### Component Scaffold
```tsx
import { Suspense } from 'react'
import { ErrorBoundary } from 'react-error-boundary'
// Types first — explicit props contract
interface ExampleProps {
id: string
onAction: (id: string) => void
}
// Named export — easier to import and refactor
export function Example({ id, onAction }: ExampleProps) {
return (
<ErrorBoundary fallback={<div role="alert">Something went wrong</div>}>
<Suspense fallback={<div aria-busy="true">Loading…</div>}>
<ExampleContent id={id} onAction={onAction} />
</Suspense>
</ErrorBoundary>
)
}
function ExampleContent({ id, onAction }: ExampleProps) {
// State, effects, handlers here
return (
<section aria-label="Example">
{/* semantic HTML + ARIA */}
</section>
)
}
```
### Test Scaffold
```tsx
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { Example } from './Example'
describe('Example', () => {
it('renders without error', () => {
render(<Example id="1" onAction={vi.fn()} />)
expect(screen.getByRole('region', { name: /example/i })).toBeInTheDocument()
})
it('calls onAction when triggered', async () => {
const onAction = vi.fn()
render(<Example id="1" onAction={onAction} />)
await userEvent.click(screen.getByRole('button', { name: /action/i }))
expect(onAction).toHaveBeenCalledWith('1')
})
})
```
## Acceptance Criteria
An implementation is complete when:
- [ ] TypeScript compiles with `strict: true` and zero errors
- [ ] No warnings in React Strict Mode
- [ ] Accessibility: semantic HTML, ARIA roles, keyboard navigable
- [ ] Tests cover all non-trivial branches (React Testing Library)
- [ ] Error boundary wraps async/fetch-dependent subtrees
- [ ] No direct state mutations
## Knowledge Reference
**Core:** React 19.2, TypeScript, Server Components, use() hook, Suspense, form actions, `<Activity>`, `useEffectEvent()`, `cacheSignal`, Performance Tracks
**React 19.2 Advanced:** Actions API, optimistic updates, concurrent rendering, `startTransition`, `useDeferredValue`, ref as prop, context without Provider, ref callback cleanup, document metadata hoisting, hydration diagnostics
**State:** Zustand, Redux Toolkit, TanStack Query, React Context, context splitting, selector patterns
**Testing:** React Testing Library, Vitest, Jest, userEvent, Playwright, Cypress
**Architecture:** Next.js App Router, React Router, RSC patterns, WCAG 2.1 AA accessibility, Vite, Turbopack, ESBuild
**Design Systems:** Microsoft Fluent UI, Material UI, Shadcn/ui, custom design system architecture
**Performance:** React Compiler, bundle analysis, code splitting, lazy loading, Core Web Vitals, React DevTools Profiler
Pliki w paczce (9)
- SKILL.md 9 KB
- references/code-examples.md 5 KB
- references/hooks-patterns.md 4 KB
- references/migration-class-to-modern.md 23 KB
- references/performance.md 4 KB
- references/react-19-features.md 10 KB
- references/server-components.md 3 KB
- references/state-management.md 4 KB
- references/testing-react.md 4 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · wesleyegberto/software-engineering-skills | 100 | MIT |
| Jeffallan/claude-skills | 100 | MIT |
| aAAaqwq/AGI-Super-Team | 100 | MIT |
| personamanagmentlayer/pcl | 100 | Apache-2.0 |
| aarvion-ai/stackwise-skills | 100 | MIT |
| miaoge-ge/coding-agent-skills | 100 | MIT |
Migawka bazy z 28.10.2026 · wersja paczki a5d8a61cb2a5 (skrót SHA-256 całej paczki)
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100react-idioms
Podpowiada idiomy React 19: własne hooki, granice Suspense, kompozycję komponentów, zarządzanie stanem i wydajność w przeglądarce. - 95react
Pomaga budować funkcje React: własne hooki, Suspense, granice błędów, Server Components i animacje. - 100react-stinger
Przegląda i refaktoryzuje architekturę React 18 i 19: warstwy stanu, Server Components, Suspense, Actions, granice danych i testowanie. - 100react-ops
Obejmuje wzorce programowania w React: hooki, zarządzanie stanem, Server Components, optymalizacja wydajności, zustand, react query, error boundary i Suspense w React 19. - 100react
Obejmuje podstawowe wzorce React 19: hooki, Suspense, lazy loading, strukturę komponentów, dobre praktyki TypeScript i optymalizację wydajności. - 100react-patterns
Opisuje wzorce React 18 i 19: dyscyplina hooków, granice komponentów serwerowych i klienckich, Suspense z error boundaries, akcje formularzy, pobieranie danych i dostępna kompozycja.