Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove state queue from useSyncExternalStore #22265

Merged
merged 1 commit into from
Sep 7, 2021

Commits on Sep 7, 2021

  1. Remove state queue from useSyncExternalStore

    The userspace shim of useSyncExternalStore uses a useState hook because
    it's the only way to trigger a re-render. We don't actually use the
    queue to store anything, because we read the current value directly
    from the store.
    
    In the native implementation, we can schedule an update on the fiber
    directly, without the overhead of a queue.
    acdlite committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    220d6df View commit details
    Browse the repository at this point in the history