react / react/react-native

react-native@0.85.3 peerDependencies allow react@19.2.6 but embedded renderer requires exact 19.2.3

オープン
#57,079 コメント 2 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: Attention Needs: Repro
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description

react-native@0.85.3 declares this peer dependency:

{
  "react": "^19.2.3"
}

That allows package managers to install react@19.2.6, but the embedded React Native renderer in the same package appears to require react@19.2.3 exactly at runtime.

In Libraries/Renderer/implementations/ReactNativeRenderer-dev.js from react-native@0.85.3:

var isomorphicReactPackageVersion = React.version;
if ("19.2.3" !== isomorphicReactPackageVersion)
  throw Error(
    'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n  - react:                  ' +
      (isomorphicReactPackageVersion +
        "\n  - react-native-renderer:  19.2.3\nLearn more: https://react.dev/warnings/version-mismatch")
  );

The renderer internals also report:

version: "19.2.3",
rendererPackageName: "react-native-renderer",
reconcilerVersion: "19.2.3"

So the install-time contract says react@19.2.6 is acceptable, while the runtime contract rejects it.

Steps to reproduce
  1. Install react-native@0.85.3.
  2. Install react@19.2.6 and react-dom@19.2.6.
  3. Launch a React Native app.
Expected behavior

The package metadata should prevent installing a React version that the embedded renderer will reject at runtime, or tooling/docs should make this exact-version requirement explicit enough to catch before app launch.

For example, one of these would avoid the mismatch:

  • narrow react-native@0.85.3's peerDependencies.react to the exact renderer-compatible version, 19.2.3, or
  • add install/doctor guidance that react must exactly match the embedded react-native-renderer version, not just satisfy the semver peer range.
Actual behavior

react@19.2.6 satisfies ^19.2.3, but the app fails at runtime because the embedded react-native-renderer is 19.2.3.

Environment

Observed from package contents:

{
  "reactNativeVersion": "0.85.3",
  "reactPeer": "^19.2.3",
  "rendererCheck": "19.2.3",
  "rendererVersion": "19.2.3"
}

This came up in a pnpm monorepo where web packages resolve react@19.2.6 and an Expo/RN mobile app correctly needs react@19.2.3. The monorepo context made the mismatch more visible, but the underlying issue seems to be that the package metadata permits a React patch version that the renderer rejects.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

パッケージメタデータ内の react peer 依存関係を、Libraries/Renderer/implementations/ReactNativeRenderer-dev.js にある正確なバージョンチェックと比較してください。react@19.2.6 を使ってインストールを再現し、そのうえでパッケージコントラクトまたはガイダンスによってランタイムの不一致を防ぐべきかを判断してください。完了条件は、サポート対象の React バージョンがアプリの起動前に拒否されるか、明確に識別されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native
領域
mobile
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。