react/packages/react-devtools-shared
Andrew Clark d3e0869324
Make root.unmount() synchronous (#22444)
* 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.

* 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.
2021-09-27 14:04:39 -07:00
..
src Make root.unmount() synchronous (#22444) 2021-09-27 14:04:39 -07:00
babel.config.js DevTools: Drop IE 11 support (#19875) 2020-09-21 11:07:45 -04:00
buildUtils.js added react native feature flags (#22199) 2021-08-30 14:12:52 -07:00
package.json Moved named hooks code (and tests) from react-devtools-extensions to react-devtools-shared (#22260) 2021-09-07 11:44:49 -04:00