react19-concurrent-patterns — GitHub Copilot skill
Preserves React 18 concurrent patterns during React 19 migrations and guides the adoption of use(), useOptimistic, and Actions.
npx skills add github/awesome-copilot --skill react19-concurrent-patternsWhat react19-concurrent-patterns does
The skill divides React 19 migration into two clear phases: preservation and adoption. Migration tools should modify general React API surface like forwardRef, but concurrent code must stay intact. Patterns like useTransition, useDeferredValue, and createRoot work identically. They require no updates.
New features like use(), useOptimistic, and Actions belong in a separate cleanup sprint. The skill includes a grep command to verify that concurrent calls stayed untouched during the migration.
Use this skill if you run React 19 upgrades and want to keep concurrent code safe.
What it helps with
- Preserve React 18
useTransitionanduseDeferredValueduring migration - Verify concurrent code integrity using a targeted grep command
- Schedule the rollout of
use()and Actions after the upgrade stabilizes - Separate React API syntax cleanup from concurrent logic changes
Example prompts for the agent
- Check if the React 19 migration touched useTransition or useDeferredValue in src/
- Guide me through adopting the use() hook after completing the React 19 upgrade
How to install react19-concurrent-patterns
1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill react19-concurrent-patterns2GitHub CLI
gh skill install github/awesome-copilot react19-concurrent-patterns3Manually: put the files in place
.github/skills/react19-concurrent-patterns/SKILL.md1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill react19-concurrent-patterns -a claude-code2Manually: put the files in place
~/.claude/skills/react19-concurrent-patterns/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/react19-concurrent-patterns/
Manually: put the files in place
.agents/skills/react19-concurrent-patterns/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/react19-concurrent-patterns/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
Platform CLI
gemini skills install https://github.com/github/awesome-copilot --path skills/react19-concurrent-patternsManually: put the files in place
.devin/skills/react19-concurrent-patterns/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set554
The whole set →Similar
Questions about react19-concurrent-patterns
How do I install react19-concurrent-patterns for GitHub Copilot?
Run gh skill install github/awesome-copilot react19-concurrent-patterns or npx skills add github/awesome-copilot --skill react19-concurrent-patterns. You can also place .github/skills/react19-concurrent-patterns/SKILL.md in your project.
What does react19-concurrent-patterns do?
It enforces safety rules for React 19 migrations. The skill prevents changes to working React 18 concurrent patterns and delays the adoption of new APIs until the migration stabilizes.
Which React 18 patterns should remain untouched during migration?
Do not modify createRoot, useTransition, useDeferredValue, or Suspense for lazy loading. React 19 runs these patterns without modifications.
Source text
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