react19-concurrent-patterns — скилл для GitHub Copilot
Защищает concurrent-паттерны React 18 от поломок при миграции на React 19. Подсказывает, когда внедрять новые хуки use, useOptimistic и Actions.
npx skills add github/awesome-copilot --skill react19-concurrent-patternsЧто делает react19-concurrent-patterns
Скилл делит работу с React 19 на два шага: сохранение старого кода и добавление новых возможностей. Во время миграции нельзя трогать useTransition, useDeferredValue, createRoot и Suspense для code splitting. Они работают без изменений.
Новые интерфейсы вроде хука use(), useOptimistic, useActionState и Suspense для загрузки данных инструкция предписывает внедрять только после стабилизации проекта. Внутри есть grep-проверка для поиска файлов, которые мигратор затронул по ошибке.
Этот скилл нужен тем, кто переводит кодовую базу на React 19 и не хочет случайно переписать рабочую concurrent-логику.
Какие задачи решает
- Защитить вызовы
useTransitionиuseDeferredValueот случайных правок мигратора - Проверить через grep сохранность concurrent-паттернов React 18
- Спланировать внедрение хука
use()и Actions после стабилизации кода - Разделить миграцию API и обновление логики загрузки данных
Примеры запросов агенту
- Проверь кодовую базу, не затронула ли миграция на React 19 вызовы useTransition и useDeferredValue
- Покажи, как внедрить хук use() для контекста после обновления до React 19
Как установить react19-concurrent-patterns
1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill react19-concurrent-patterns2GitHub CLI
gh skill install github/awesome-copilot react19-concurrent-patterns3Вручную: положить файлы
.github/skills/react19-concurrent-patterns/SKILL.md1Через Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill react19-concurrent-patterns -a claude-code2Вручную: положить файлы
~/.claude/skills/react19-concurrent-patterns/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/react19-concurrent-patterns/
Вручную: положить файлы
.agents/skills/react19-concurrent-patterns/SKILL.mdДля всех проектов — ~/.agents/skills/
Вручную: положить файлы
.cursor/skills/react19-concurrent-patterns/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
Командой платформы
gemini skills install https://github.com/github/awesome-copilot --path skills/react19-concurrent-patternsВручную: положить файлы
.devin/skills/react19-concurrent-patterns/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора674
Весь набор →Похожие
Рядом в теме «Фронтенд и UI»
Всё по теме «Фронтенд и UI» →Вопросы о react19-concurrent-patterns
Как установить react19-concurrent-patterns в GitHub Copilot?
Запустите gh skill install github/awesome-copilot react19-concurrent-patterns или добавьте файл .github/skills/react19-concurrent-patterns/SKILL.md в репозиторий. Также работает команда npx skills add github/awesome-copilot --skill react19-concurrent-patterns.
Что делает react19-concurrent-patterns?
Он задаёт правила безопасности при переходе на React 19. Скилл запрещает менять работающие concurrent-паттерны React 18 во время миграции и переносит внедрение новых API на отдельный этап.
Какие паттерны React 18 скилл запрещает менять?
Нельзя модифицировать createRoot, useTransition, useDeferredValue и Suspense для lazy-компонентов. Они продолжают работать в React 19 без переделки.
Исходный текст
SKILL.md · MIT
---
name: react19-concurrent-patterns
description: 'Preserve React 18 concurrent patterns and adopt React 19 APIs (useTransition, useDeferredValue, Suspense, use(), useOptimistic, Actions) during migration.'
---
# React 19 Concurrent Patterns
React 19 introduced new APIs that complement the migration work. This skill covers two concerns:
1. **Preserve** existing React 18 concurrent patterns that must not be broken during migration
2. **Adopt** new React 19 APIs worth introducing after migration stabilizes
## Part 1 Preserve: React 18 Concurrent Patterns That Must Survive the Migration
These patterns exist in React 18 codebases and must not be accidentally removed or broken:
### createRoot Already Migrated by the R18 Orchestra
If the R18 orchestra already ran, `ReactDOM.render` → `createRoot` is done. Verify it's correct:
```jsx
// CORRECT React 19 root (same as React 18):
import { createRoot } from 'react-dom/client';
const root = createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
```
### useTransition No Migration Needed
`useTransition` from React 18 works identically in React 19. Do not touch these patterns during migration:
```jsx
// React 18 useTransition unchanged in React 19:
const [isPending, startTransition] = useTransition();
function handleClick() {
startTransition(() => {
setFilteredResults(computeExpensiveFilter(input));
});
}
```
### useDeferredValue No Migration Needed
```jsx
// React 18 useDeferredValue unchanged in React 19:
const deferredQuery = useDeferredValue(query);
```
### Suspense for Code Splitting No Migration Needed
```jsx
// React 18 Suspense with lazy unchanged in React 19:
const LazyComponent = React.lazy(() => import('./LazyComponent'));
function App() {
return (
<Suspense fallback={<Spinner />}>
<LazyComponent />
</Suspense>
);
}
```
---
## Part 2 React 19 New APIs
These are worth adopting in a post-migration cleanup sprint. Do not introduce these DURING the migration stabilize first.
For full patterns on each new API, read:
- **`references/react19-use.md`** the `use()` hook for promises and context
- **`references/react19-actions.md`** Actions, useActionState, useFormStatus, useOptimistic
- **`references/react19-suspense.md`** Suspense for data fetching (the new pattern)
## Migration Safety Rules
During the React 19 migration itself, these concurrent-mode patterns must be **left completely untouched**:
```bash
# Verify nothing touched these during migration:
grep -rn "useTransition\|useDeferredValue\|Suspense\|startTransition" \
src/ --include="*.js" --include="*.jsx" | grep -v "\.test\."
```
If the migrator touched any of these files, review the changes the migration should only have modified React API surface (forwardRef, defaultProps, etc.), never concurrent mode logic.
© github · MIT · github/awesome-copilot