Hydration runs an async memo over latest(...) of a hydrated chain with undefined and re-asks
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- TypeScript
- Star
- 36.2k
- Fork
- 1.1k
- Merge trung bình
- 10 giờ 28 phút
- Pull request đã merge (30 ngày)
- 379
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của solidjs/solid
-
`lazy()`: remounting an already-loaded component renders empty (or the Suspense fallback) since 1.9.14Có thể đã có người làm @itisrmk đã nhận 12 ngày trước. Đang mở1.x
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 51/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
solidjs/solid#4398 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[2.0 / next] A memo reading latest(a) beside b() computes a torn pass on a batched write; if that pass throws, the error sticksCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[2.0 / next] latest(m) returns undefined for an uninitialized async memo after its latest() input changes (A7)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của solidjs/solid
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marmelab/react-admin#11431 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
db-ux-design-system/core-web#8655 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
stripe/react-stripe-js#728 ·
-
[Upload Grade C dataset] the pop-up changes it's size while uploading the document => Jumping effectĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
epam/statgpt-admin-frontend#305 ·
Maintainer thường phản hồi trong vòng 1 ngày