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.


jest.advanceTimersByTime(1000);
    expect(Scheduler).toHaveYielded(['Promise resolved [B]']);
    expect(Scheduler).toFlushAndYield(['B']);
    expect(root).toMatchRenderedOutput('AB');
  });
  it('interrupts current render if promise resolves before current render phase', () => {
    let didResolve = false;
    const listeners = [];
    const thenable = {
      then(resolve) {
        if (!didResolve) {
          listeners.push(resolve);
        } else {
          resolve();
        }
      },
    };
    function resolveThenable() {
      didResolve = true;
      listeners.forEach(l => l());
    }
    function Async() {
      if (!didResolve) {
        Scheduler.unstable_yieldValue('Suspend!');
        throw thenable;
      }
      Scheduler.unstable_yieldValue('Async');
      return 'Async';
    }
    const root = ReactTestRenderer.create(