react19-concurrent-patterns
できること
このツールは、React 19に更新したあとも、React 18にすでにあった並行処理(コンカレンシー)の機能が正しく動き続けるように確認する手助けをします。また、更新後に使えるReact 19の新機能を採用するタイミングも提案します。
使う場面
- ✓古いバージョンからReact 19へプロジェクトを更新するとき。
- ✓パフォーマンス(並行処理)に関わる重要なコードが、更新によって壊れていないか確認したいとき。
- ✓主要な更新が安定したあと、どのReact 19の新機能を追加するか決めるとき。
スキルのリンク
https://github.com/github/awesome-copilot/blob/main/skills/react19-concurrent-patterns/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“React 19への更新中に、トランジション(`useTransition`)と遅延値(`useDeferredValue`)のコードがそのまま維持されているか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、`useTransition`、`useDeferredValue`、および画面の一部を読み込むための`Suspense`を使っているコードが、誤って変更されていないかを確認します。また、更新が安定したあとに使えるReact 19の新機能も指摘します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
React 19 Concurrent Patterns
React 19 introduced new APIs that complement the migration work. This skill covers two concerns:
- Preserve existing React 18 concurrent patterns that must not be broken during migration
- 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:
// 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:
// React 18 useTransition unchanged in React 19:
const [isPending, startTransition] = useTransition();
function handleClick() {
startTransition(() => {
setFilteredResults(computeExpensiveFilter(input));
});
}
useDeferredValue No Migration Needed
// React 18 useDeferredValue unchanged in React 19:
const deferredQuery = useDeferredValue(query);
Suspense for Code Splitting No Migration Needed
// 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.mdtheuse()hook for promises and contextreferences/react19-actions.mdActions, useActionState, useFormStatus, useOptimisticreferences/react19-suspense.mdSuspense for data fetching (the new pattern)
Migration Safety Rules
During the React 19 migration itself, these concurrent-mode patterns must be left completely untouched:
# 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.
よくある質問
Reactの「並行処理(コンカレンシー)」とは何ですか?
並行処理とは、複数の作業を同時に管理するReactの仕組みです。特に、バックグラウンドで時間のかかる処理が行われているときでも、ユーザーインターフェースの反応を良く保つことができます。
移行中にReact 19の新しいAPIを使ってはいけないのはなぜですか?
まず主要な更新を確実に動かすことが大切だからです。同時に新機能を導入すると、問題が起きたときの原因特定が難しくなります。
このケースで`grep`は何をするのですか?
`grep`コマンドは、すべてのファイルから特定のコードの断片(`useTransition`など)を検索するために使われます。これにより、更新中に並行処理に関する重要なコードが意図せず変更されていないかを確認できます。
詳細
作者による元の説明
Preserve React 18 concurrent patterns and adopt React 19 APIs (useTransition, useDeferredValue, Suspense, use(), useOptimistic, Actions) during migration.
repo: github/awesome-copilot
人気
- GitHubのスター
- 40k
- ランキング
- #7389
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
acquire-codebase-knowledge
40kエージェントが、既存のコードプロジェクトを理解してドキュメント化できるよう支援します。新しく参加するメンバーのオンボーディングや、アーキテクチャの全体像の把握に役立ちます。
acreadiness-assess
40kエージェントが、プロジェクトのAI対応状況を評価してレポートを生成できるよう支援します。プロジェクトがAIツールをどの程度活用できる状態にあるかを把握するのに役立ちます。
acreadiness-generate-instructions
40kエージェントが、評価結果をもとにAIツール向けの指示文を作成できるよう支援します。AIがコードとどのようにやり取りするかを改善し、特定された不足点を解消するのに役立ちます。
acreadiness-policy
40kエージェントが、AIプロジェクトの評価ポリシーの策定や適用を支援できるようにします。プロジェクトの評価方法を標準化し、コンプライアンスを確保するのに役立ちます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。