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.


}
  invariant(
    false,
    'Expected to find a host parent. This error is likely caused by a bug ' +
      'in React. Please file an issue.',
  );
}
function isHostParent(fiber: Fiber): boolean {
  return (
    fiber.tag === HostComponent ||
    fiber.tag === HostRoot ||
    fiber.tag === HostPortal
  );
}
function getHostSibling(fiber: Fiber): ?Instance {
   
   
   
   
  let node: Fiber = fiber;
  siblings: while (true) {
     
    while (node.sibling === null) {
      if (node.return === null || isHostParent(node.return)) {
         
         
        return null;
      }
      node = node.return;
    }