Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

react

БесплатноБез исполняемых скриптовНе проверен

Use these React guidelines when editing or reviewing `.tsx` files, i.e. TypeScript React components.

quisidoот quisido★ 31 звезда на GitHub

Об этом скилле

React guidelines

Conventions

  • Provide stable keys in lists. Avoid using array indices as keys.

  • Co-locate styles with the component. Prefer CSS modules with the file name convention component-name.module.scss.

  • Destructure props in the function signature.

  • Extract reusable UI into src/components and custom hooks into src/hooks.

  • Follow the React hooks rules (no conditional hooks).

  • Keep components small and focused. Prefer <200 lines of code per file and <4 responsibilities.

  • Prefer className composition over inline styles; only use inline styles for dynamic, computed values.

  • Prefer default exports for components (with explicit function names).

  • Type props explicitly; avoid React.FC. Prefer:

    import { type ReactElement, type ReactNode } from 'react';
    
    interface Props {
      readonly children: ReactNode;
    }
    
    export default function Component({ children }: Props): ReactElement {
      // ...
    }
    
  • Use function components with hooks.

  • Use ReactElement as the return type for components that return JSX.

Constraints

  • Never use vi.mock. Instead, write testable code and/or use dependency injection (e.g. React context).

  • Avoid setState/useState updates based on stale closures. Prefer functional updates when derived from previous state.

    // Prefer:
    setCount((oldCount: number): number => oldCount + 1)
    
    // Over:
    setCount(oldCount + 1)
    

Установить react в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл react?

Use these React guidelines when editing or reviewing `.tsx` files, i.e. TypeScript React components.

Как установить скилл react?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл react запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить react с