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

New async memo reveals a held signal update early

Đã đóng
#3,800 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

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
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 async memo and scheduled render-effect behavior in the repository, then compare the issue’s reproduction with the earlier report #3408. The linked playground reproduces the early reveal; no source file or test is named, so locate or add focused coverage for synchronous versus asynchronous first results and the explicit flush. Done when the new observer remains held until the slow derivation settles.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Describe the bug

A newly created async memo reads an update that is still held by an existing async derivation, then notifies a scheduled render effect before that update is revealed. The existing scheduled render effect still last reported count = 1, slow = 1, while the new one reports 2.

The same newly created memo stays held when its first result is synchronous. Returning Promise.resolve(count()) instead makes it reveal early.

Your Example Website or App

https://s.olid.uk/id/22KYZfNOSnqqlHlUzL1MqQ

Steps to Reproduce the Bug or Issue
  1. Open the playground console and press Build (or reload).
  2. After about one second, observe parent 1 1.
  3. About 100ms later, observe child 2 while the parent is still held at 1 1.
  4. Roughly one second after that, the slow derivation settles and the parent finally reports parent 2 2.
Expected behavior

The new scheduled render observer should stay held until the input update can be revealed with its slow derivation. An asynchronous first result should preserve the inherited hold, just as a synchronous first result does.

Screenshots or Videos

No response

Platform
  • OS: Linux
  • Browser: Chromium 151.0.7922.173
  • Solid: 2.0.0-rc.13 in the playground; also reproduced on upstream next at b0bad02, in development and production.
Additional context

Both render effects use { schedule: true }, so this excludes the immediate mounting-effect path. The repro uses only primitives.

Two controls preserve the hold:

  • Replace Promise.resolve(count()) with count().
  • Remove the explicit flush() before creating the new memo.

The development warnings about unowned effects are expected in this minimal repro.

Related earlier report: #3408. Here the synchronous first result behaves correctly; the asynchronous first result does not.

Ngôn ngữ chính
TypeScript
Star
36.2k
Fork
1.1k
Merge trung bình
11 giờ
Pull request đã merge (30 ngày)
343

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.