Hydration runs an async memo over latest(...) of a hydrated chain with undefined and re-asks
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
- 領域
- frontend
調査の方向性
Start by reading the hydration and latest() implementation, then inspect the async memo tests and the behavior described in the reproduction. Reproduce hydration with the shell arriving before streamed chunks, and check that fetchC is not called before the first client write. Done when latest() on an uninitialized node throws in every scope and hydration claims the streamed value without refetching.
索引モデルが issue の本文から書いたものです。
説明
Found by the async app generator's hydration phase (#4371). Reproduces on next 5f60713a. It looks like the hydration side of #4363 (latest() returns undefined, which breaks A7), and it also breaks no-refetch.
const [s] = createSignal(3);
function App() {
const m0 = createMemo(() => fetchA(1 + s())); // 4
const m1 = createMemo(() => fetchB(1 + latest(m0))); // 5
const m2 = createMemo(() => fetchC(1 + latest(m1))); // 6
return (
<main>
<Errored fallback={e => "[ROOT-E]"}>
<Loading fallback="[ROOT-L]">
<span data-a={String(m2())} />
</Loading>
</Errored>
</main>
);
}
The server streams all three answers (4, 5, 6) and the fragment <span data-a="6">. A client that hydrates the shell before the chunks arrive calls fetchC(NaN) for real. So latest(m1) returned undefined inside m2's compute during hydration, and that compute asked again instead of claiming the streamed 6.
Expected: no ask before the first client write, and latest() of an uninitialized node throws in every scope, never undefined (A7).
- 主要言語
- TypeScript
- スター
- 36.2k
- フォーク
- 1.1k
- 平均マージ
- 11時間 5分
- マージ済み PR(30日)
- 475
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
solidjs/solid のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 12/100
メンテナーはふだん 1 日以内に返信
-
[2.0 / next] <Errored> recovery shows a pending memo's answer to an older input beside the new inputオープン
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/playwright#43875 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
calagopus/panel#285 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 88/100
adobe/react-spectrum#10909 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Run the dependency drift check対応中かも @spaceninja が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
cloudfour/lighthouse-parade#449 ·
メンテナーはふだん 1 日以内に返信