view --main react-skill-dlya-razrabotki-interfeysov.md
react — скилл для разработки интерфейсов
readonly
--- lines
---
name: react
description: 'Skill: react'
---
## Components
- **Prefer function components**: Use React function components with hooks over class components.
- **Client vs server**: Mark interactive components with `"use client"` at the top of the file; keep non-interactive logic in server components or libraries.
- **No default exports**: Use named exports for all components.
## Hooks
- **Hook ordering**: Follow the standard rules of hooks; no conditional or looped hooks.
- **Derived state**: Prefer deriving values from props/form state instead of duplicating them in `useState`.
- **Effects**: Keep `useEffect` minimal and side effect focused; avoid using it for basic data derivation.
## Forms
- **Validation**: Use `react-hook-form` + Zod for all non-trivial forms.
- **UI primitives**: Prefer shadcn `Form` primitives (`Form`, `FormField`, `FormItem`, `FormLabel`, `FormControl`, `FormMessage`) for form layout and error handling.
- **Schema location**: Co-locate small form schemas with the component; extract only when reused across modules.
## Styling & Layout
- **Class merging**: Use the shared `cn` utility for conditional classes.
- **Composition**: Prefer smaller composed components over deeply nested JSX in a single component.
- **Responsive design**: Prefer Tailwind responsive classes (`md:hidden`, `hidden md:flex`, etc.) over JS-based checks like `isMobile`. Use `isMobile` from `useSidebar()` only when CSS cannot handle the logic (e.g., conditional rendering that affects data fetching or complex state).
Инициализация мануала...
//
$ ls -R related_skills/
2026-03-29
⭐ 4884
Streamdown — Потоковая визуализация AI-контента в терминале
2026-04-01
⭐ 105
React 19: Скилл оптимизации производительности
2026-04-08
⭐ 493
durable-ui: Скилл для сохранения состояния веб-приложений
2026-04-01
⭐ 201
code-architecture-tailwind-v4-best-practices: Скилл для Tailwind компонентов
package.json
$ install --global
skills.sh
npx skills add https://github.com/FranciscoMoretti/chat-js/tree/main/apps/chat/.cursor/skills/react
$ download --local
man
[HINT] Скачивает всю директорию скилла с GitHub: SKILL.md и все связанные файлы