Skip to content

2.0.0-rc Async memo chain publishes a stale result alongside a newer signal value #3373

Description

@GabbeV

Describe the bug

Updating a signal again while its async memo chain is pending can make one JSX expression show mismatched values. The repro displays 0 / 0 → 2 / 1 → 2 / 2, even though both memos just forward the signal's value.

Your Example Website or App

https://s.olid.uk/id/iP5gJf0HRSGuTKCEGVKrLA

Steps to Reproduce the Bug or Issue

  1. Wait for 0 / 0 to appear.
  2. Click Run.
  3. See 2 / 1 appear before settling at 2 / 2.

Expected behavior

Both numbers should always match.

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Firefox

Additional context

Reproduces on next at f8b40b7 and #3337 at 20f3143.

Making either memo synchronous removes the mismatch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions