resq
resq copied to clipboard
fix react 18 in legacy mode: _reactRootContainer might still be defined
If you're running React 18, but using the legacy API's still, _reactRootContainer is undefined, but it doesn't have the _internalRoot property on it. This should fix that – in React 18 legacy, we want to follow the React 18 path for finding the react instance, ideally.
You can see the problem here: https://codepen.io/cyberdash/pen/oNJLaeo?editors=1111