Intended behavior: https://github.com/reactwg/react-18/discussions/31

Sandbox: https://codesandbox.io/s/react-18-layouteffect-semantics-forked-m02w5

Expected: when suspended content is hidden and then shown, we get layout cleanup followed by layout setup.
Actual: only layout cleanup happens.


node: Fiber,
  before: ?Instance,
  parent: Instance,
): void {
  const {tag} = node;
  const isHost = tag === HostComponent || tag === HostText;
  if (isHost) {
    const stateNode = node.stateNode;
    if (before) {
      insertBefore(parent, stateNode, before);
    } else {
      appendChild(parent, stateNode);
    }
  } else if (tag === HostPortal) {
     
     
     
  } else {
    const child = node.child;
    if (child !== null) {
      insertOrAppendNode(child, before, parent);
      let sibling = child.sibling;
      while (sibling !== null) {
        insertOrAppendNode(sibling, before, parent);
        sibling = sibling.sibling;
      }
    }
  }
}
function unmountHostComponents(