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.


React.startTransition(() => {
        root.update(<Foo renderBar={true} />);
      });
    } else {
      root.update(<Foo renderBar={true} />);
    }
    expect(Scheduler).toFlushAndYield([
      'Foo',
      'Bar',
      
      'Suspend! [A]',
      
      'B',
      'Loading...',
    ]);
    expect(root).toMatchRenderedOutput(null);
    
    jest.advanceTimersByTime(50);
    
    expect(Scheduler).toFlushWithoutYielding();
    expect(root).toMatchRenderedOutput(null);
    
    jest.advanceTimersByTime(50);
    
    expect(Scheduler).toHaveYielded(['Promise resolved [A]']);
    expect(Scheduler).toFlushAndYield(['Foo', 'Bar', 'A', 'B']);
    expect(root).toMatchRenderedOutput('AB');
  });
  it('suspends siblings and later recovers each independently', () => {