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

Fix useSyncExternalStore dropped update when state is dispatched in render phase #25578

Merged
merged 2 commits into from
Nov 8, 2022

Commits on Oct 28, 2022

  1. Use correct previous value in useSyncExternalStore (facebook#25565)

    If state is dispatched during render phase, then work in progress
    `hook` will hold already updated memoized state, defeating previous
    value comparison.
    
    Using `currentHook` instead fixes that issue.
    pandaiolo committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    e9aa33e View commit details
    Browse the repository at this point in the history
  2. Sync reconciler forks

    pandaiolo committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    776bd87 View commit details
    Browse the repository at this point in the history