Thanks to visit codestin.com
Credit goes to github.com

Skip to content

2.0.0-rc Signal update lost when a suspending reader is unmounted #3372

Description

@GabbeV

Describe the bug

setShow(true) waits for an async memo. Unmounting its reader before it resolves leaves show() stuck at false, even after all async work finishes.

Your Example Website or App

https://s.olid.uk/id/-oM9acvMQFu_ehAAj-lP4Q

Steps to Reproduce the Bug or Issue

  1. Wait two seconds for the initial value to settle.
  2. Click Run.
  3. Wait for everything to finish. Show stays false.

Expected behavior

Show eventually becomes true. Removing the reader shouldn't lose the update.

Screenshots or Videos

No response

Platform

  • OS: Windows
  • Browser: Firefox

Additional context

Reproduces on next at 961cc77 and #3337 at 20f3143.

Removing setMounted(false), or increasing the second delay to 1500ms, lets show become true.

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