Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 32eefcb3c5131f4d77a2195ff11a00a2513cf62f
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2b25548d99aba4d6c28c765422d53efe6d29758c
Choose a head ref
  • 1 commit
  • 12 files changed
  • 1 contributor

Commits on Jul 1, 2021

  1. Replace unbatchedUpdates with flushSync

    There's a weird quirk leftover from the old Stack (pre-Fiber)
    implementation where the initial mount of a leagcy (ReactDOM.render)
    root is flushed synchronously even inside `batchedUpdates`.
    
    The original workaround for this was an internal method called
    `unbatchedUpdates`. We've since added another API that works almost the
    same way, `flushSync`.
    
    The only difference is that `unbatchedUpdates` would not cause other
    pending updates to flush too, only the newly mounted root. `flushSync`
    flushes all pending sync work across all roots. This was to preserve
    the exact behavior of the Stack implementation.
    
    But since it's close enough, let's just use `flushSync`. It's unlikely
    anyone's app accidentally relies on this subtle difference, and the
    legacy API is deprecated in 18, anyway.
    acdlite committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    2b25548 View commit details
    Browse the repository at this point in the history
Loading