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.


'This unit of work tag should not have side-effects. This error is ' +
            'likely caused by a bug in React. Please file an issue.',
        );
    }
  }
  if (enableScopeAPI) {
    
    
    if (finishedWork.flags & Ref && finishedWork.tag !== ScopeComponent) {
      commitAttachRef(finishedWork);
    }
  } else {
    if (finishedWork.flags & Ref) {
      commitAttachRef(finishedWork);
    }
  }
}
function hideOrUnhideAllChildren(finishedWork, isHidden) {
  
  const isModernRoot = (finishedWork.mode & ConcurrentMode) !== NoMode;
  const current = finishedWork.alternate;
  const wasHidden = current !== null && current.memoizedState !== null;
  
  let hostSubtreeRoot = null;
  if (supportsMutation) {
    
    
    let node: Fiber = finishedWork;
    while (true) {
      if (node.tag === HostComponent) {