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: 2e41568313620ab564425be7e5d777581e2db5d4
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8cb21aa32487d430dd8a7f1d5df7d470b8a84163
Choose a head ref
  • 2 commits
  • 13 files changed
  • 1 contributor

Commits on Sep 27, 2021

  1. Move flushSync warning to React DOM

    When you call in `flushSync` from an effect, React fires a warning. I've
    moved the implementation of this warning out of the reconciler and into
    React DOM.
    
    `flushSync` is a renderer API, not an isomorphic API, because it has
    behavior that was designed specifically for the constraints of React
    DOM. The equivalent API in a different renderer may not be the same.
    For example, React Native has a different threading model than the
    browser, so it might not make sense to expose a `flushSync` API to the
    JavaScript thread.
    acdlite committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    aa17cc2 View commit details
    Browse the repository at this point in the history
  2. Make root.unmount() synchronous

    When you unmount a root, the internal state that React stores on the
    DOM node is immediately cleared. So, we should also synchronously
    delete the React tree. You should be able to create a new root using
    the same container.
    acdlite committed Sep 27, 2021
    Configuration menu
    Copy the full SHA
    8cb21aa View commit details
    Browse the repository at this point in the history
Loading