Syntic

Skills may execute instructions and code that could affect your environment. Marketplace scans reduce risk but do not guarantee safety. Always review files, run your own security checks, and use at your own risk.

LanguagesFree Safe

React Specialist

Security Scan Summary

Status: Safe

Source: Syntic Skills registry

Automated security scan completed with no high-risk patterns detected. Manual review is still required.

About This Skill

Use when building React 19 applications with hooks, state management, concurrent features, and component architecture.

Downloadable SKILL.md

Download SKILL.md and place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review contents, and run in a controlled environment first. Acknowledge the risk notice above to enable the download.

SKILL.md
---
name: React Specialist
description: Use when building React 19 applications with hooks, state management, concurrent features, and component architecture.
category: Languages
version: 1.0.0
tools: []
---

# React 19 Development

Build maintainable, performant component architectures using React 19 and modern patterns.

## Core Principles

- Components should do one thing; split if exceeding 200 lines
- Colocate state with components that use it; lift state only for sibling sharing
- Props are the component API; design like function signatures: minimal, typed, documented
- Optimize only after measuring with React DevTools Profiler; avoid premature `React.memo`, `useMemo`, `useCallback`

## Component Patterns

- Use function components exclusively; class components are legacy
- Prefer composition with `children` over render props or higher-order components
- Extract reusable stateful logic into custom hooks: `useDebounce`, `useMediaQuery`, `useIntersectionObserver`
- Implement compound components with React Context for complex UI patterns (Tabs, Accordion, Dropdown)

## State Management

- Use `useState` for local UI state (toggles, form inputs, visibility)
- Use `useReducer` for complex state transitions with multiple related values
- Use React Context for dependency injection (theme, auth, feature flags), not for frequently updating state
- Use Zustand for global client state; use TanStack Query for server state
- Never store derived state; compute during render or use `useMemo` if computation is expensive

## React 19 Features

- Use `use` hook for reading promises and context in render: `const data = use(fetchPromise)`
- Use `useActionState` for form handling with server actions and progressive enhancement
- Use `useOptimistic` for instant UI feedback during async mutations
- Use `useTransition` to mark non-urgent state updates that should not block input
- Use `ref` as a prop (no `forwardRef` wrapper needed)

## Data Fetching & Performance

- Use TanStack Query (`useQuery`, `useMutation`) for all server state; configure `staleTime` and `gcTime`
- Prefetch data on hover or route transition: `queryClient.prefetchQuery(...)`
- Handle loading, error, empty states explicitly in every data-fetching component
- Use optimistic updates: update cache before server responds
- Implement code splitting with `React.lazy` and `Suspense` at route boundaries
- Virtualize long lists with `@tanstack/react-virtual` or `react-window`
- Avoid creating new objects/arrays in JSX props; maintain stable references

## Testing

- Use React Testing Library; query by role, label, or text
- Test behavior, not implementation; simulate user actions and assert on visible output
- Mock API calls with MSW (Mock Service Worker)
- Test custom hooks with `renderHook` from `@testing-library/react`

## Before Completing

- Run `npm test` or `vitest run` to verify tests pass
- Run `npx tsc --noEmit` to verify TypeScript types
- Run `npm run lint` to catch unused variables and accessibility issues
- Open React DevTools Profiler to verify no unnecessary re-renders

Bundle Download

Includes SKILL.md and bundled support files where provided. Risk acknowledgement is required.

Install Targets

Syntic App

  1. 1. Create a dedicated folder for this skill in your local skills library.
  2. 2. Place SKILL.md into that folder.
  3. 3. Restart Syntic and invoke this skill on matching tasks.

Syntic Code (CLI)

  1. 1. Save SKILL.md in your local Syntic Code skills directory.
  2. 2. Keep related files in the same skill folder.
  3. 3. Run in a safe environment and validate outputs.

Source

https://github.com/rohitg00/awesome-claude-code-toolkit/blob/main/agents/language-experts/react-specialist.md

Open Source Link
Languages

Related Skills