[2.0] A memo whose first read rejected reads `undefined` (not NotReady) in a verdict pass while it is re-asked
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue nà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
- 52/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ệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Start with packages/signals/src/core/async.ts and core/verdict.d.ts, then trace how notifyStatus and verdictValue handle an initially rejected memo when it is re-asked. Reproduce with the issue's createSignal, createMemo, and isPending example; compare the observed [true, undefined] with the expected NotReadyError. Done when the re-ask and related latest or createDeferred reads no longer expose undefined before a value lands.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: solid-js / @solidjs/signals 2.0.0-rc.16, rc.17 and rc.18 (not rc.15).
The isPending contract (signals core/verdict.d.ts): "A read that has no value yet is loading, not pending — the probe reports only updates to a value that already exists."
Repro (no boundaries needed):
const [n, setN] = createSignal(0)
const m = createMemo(() => {
const i = n()
return i === 0 ? Promise.reject(new Error('boom')) : new Promise(r => setTimeout(() => r({ key: 'a' }), 50))
})
createRenderEffect(
() => { try { return [isPending(() => m()), m()] } catch (e) { return [e] } },
v => console.log(v)
)
// after the rejection: StatusError, as expected
setN(1) // re-ask
// observed until the landing: [true, undefined] -- expected: NotReadyError (no value has ever landed)
Cause (dev build): notifyStatus(STATUS_ERROR) clears STATUS_UNINITIALIZED (packages/signals/src/core/async.ts), so after the re-ask verdictValue treats the node as initialized and pending and returns el._value (undefined). latest(() => m()) and createDeferred read the same.
Effect in an app: a list whose first read failed; its Retry re-asks it; a <Show when={isPending(() => page()) && …}> in the region (or any pass that probes isPending and then reads the page) dereferences undefined and throws a TypeError into the error boundary, so the retried rows never paint.
- Ngôn ngữ chính
- TypeScript
- Star
- 36.2k
- Fork
- 1.1k
- Merge trung bình
- 10 giờ 38 phút
- Pull request đã merge (30 ngày)
- 352
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 7 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 48/100
solidjs/solid#4242 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
compiler rc.18: SSR template validation rejects SVG <image> outside an <svg>-rooted templateĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 53/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/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 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
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 75/100
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 85/100
farion1231/cc-switch#8829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverĐang mởdoc-audit enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
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 85/100