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.


expect(Scheduler).toHaveYielded(['Promise resolved [B]']);
      expect(Scheduler).toFlushUntilNextPaint([
        
        
        'B',
        
        'Suspend! [C]',
      ]);
      
      jest.advanceTimersByTime(1000);
      expect(Scheduler).toHaveYielded(['Promise resolved [C]']);
      expect(Scheduler).toFlushUntilNextPaint([
        
        
        'C',
      ]);
    });
    it('#14162', () => {
      const {lazy} = React;
      function Hello() {
        return <span>hello</span>;
      }
      async function fetchComponent() {
        return new Promise(r => {
          
          setTimeout(r, 1000, {default: Hello});
        });
      }
      const LazyHello = lazy(fetchComponent);
      class App extends React.Component {