React 19.2.1 安定版へのアップデートとセキュリティ脆弱性対応 #1984
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

対応Issue
概要
実装詳細
依存関係の更新
react:19.0.0-rc-66855b96-20241106→19.2.1react-dom:19.0.0-rc-66855b96-20241106→19.2.1@types/react:^18→^19.2.7@types/react-dom:^18→^19.2.3React 19 型定義への対応
useRefの初期値を明示的に指定(型安全性の向上)JSX.ElementをReactElementに変更画面スクリーンショット等
テスト項目
pnpm run type-check)pnpm run build)備考
参考: https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components
peer dependencies の警告について
Next.js 15.0.3 と react-textfitfix が React 19.2.1 を明示的にサポートしていないため警告が出ますが、Next.js 15 は React 19 RC をサポートしていたため互換性に問題はありません。
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.