Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Hydration runs an async memo over latest(...) of a hydrated chain with undefined and re-asks

Đang mở
#4,376 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ryansolid đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #4383 của @ryansolid — đang mở

Đá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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của solidjs/solid

Tất cả issue của solidjs/solid

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.