Follow up from https://github.com/facebook/react/pull/11616.

Here's one I found. These two invariants:

https://github.com/facebook/react/blob/7e7127387ba64f57299eaff8656542cea6fb3a2d/packages/react-reconciler/src/ReactFiberClassComponent.js#L330-L343

are in a function that's behind a DEV block:

https://github.com/facebook/react/blob/7e7127387ba64f57299eaff8656542cea6fb3a2d/packages/react-reconciler/src/ReactFiberClassComponent.js#L447-L449

I don't think this is intentional, but need to verify.

There may be more. I'll use this issue to track while https://github.com/facebook/react/pull/11616 preserves existing behavior.
return expectErrors(async () => {
    ExecutionEnvironment.canUseDOM = true;
    await asyncReactDOMRender(reactElement, domElement, forceHydrate);
    ExecutionEnvironment.canUseDOM = false;
    return domElement.firstChild;
  }, errorCount);
}
async function renderIntoString(reactElement, errorCount = 0) {
  return await expectErrors(
    () =>
      new Promise(resolve =>
        resolve(ReactDOMServer.renderToString(reactElement)),
      ),
    errorCount,
  );
}
async function serverRender(reactElement, errorCount = 0) {
  const markup = await renderIntoString(reactElement, errorCount);
  var domElement = document.createElement('div');
  domElement.innerHTML = markup;
  return domElement.firstChild;
}
class DrainWritable extends stream.Writable {