Suspense mode resumes with the previous observable's value on React 19
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
npx vitest run useObservableを実行し、test/useObservable.test.tsxから始めます。特にemits the new observable's value if the observable is swapped outを確認してください。名前付きのSuspenseSubject、preloadedObservablesキャッシュ、use-sync-external-storeの経路を追跡します。完了条件は、テストが通常のitに戻され、React 18の動作を維持したままReact 19でパスすることです。
索引モデルが issue の本文から書いたものです。
説明
useObservable in suspense mode suspends correctly when the observable and observableId are swapped, then resumes rendering the previous observable's value.
Found by the first test run ever executed against React 19 (#789); nothing had run against 19 before, only type-checks.
Reproduction
test/useObservable.test.tsx, emits the new observable's value if the observable is swapped out. The test renders a component under React.Suspense, emits Jeff on the first observable, swaps both the observable and the observableId, rerenders, then emits James on the second.
- React 18.2.0: the fallback shows, then the component resumes with
James. Passes. - React 19.2.8: the fallback shows (that assertion passes), then the component resumes with
Jeff. Fails.
Deterministic: 3 runs each way, same @testing-library/react 16.3.2, only the React runtime swapped via npm install --no-save react@19 react-dom@19. No emulators involved, so npx vitest run useObservable reproduces it.
What is known and not known
- The suspend half works. Only the resume is wrong, so this is not the known throw-vs-
use()question: the 08-07 spike found theuse()swap is a behavioural no-op on 19 and that React 19 emits no warning for the current throw form. Nothing here contradicts that. - The cause is not diagnosed. The plumbing involved (
SuspenseSubject, thepreloadedObservablescache keyed byobservableId, and theuse-sync-external-storeshim delegating to React's ownuseSyncExternalStoreon 19) overlaps what #790 covers, but no connection has been established and it should not be assumed.
Current state
#789's CI PR skips this test on React 19 only, so the new test job can land green. The skip is a ? it.skip : it ternary rather than it.skipIf, because these globals are typed by @types/jest and skipIf fails tsc while working at runtime.
Restore it to a plain it when this is fixed.
- 主要言語
- TypeScript
- スター
- 3.6k
- フォーク
- 403
- 平均マージ
- 5日 1時間
- マージ済み PR(30日)
- 10
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FirebaseExtended/reactfire のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
FirebaseExtended/reactfire#801 ·
-
v5
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
FirebaseExtended/reactfire#790 · コメント 2 件 ·
-
v5
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
FirebaseExtended/reactfire#789 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
FirebaseExtended/reactfire#788 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
FirebaseExtended/reactfire#784 ·
FirebaseExtended/reactfire の issue をすべて見る
似ている issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100