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.


'Suspend! [A]',
        'Loading...',
      ]);
      jest.advanceTimersByTime(1000);
      expect(Scheduler).toHaveYielded(['Promise resolved [A]']);
      expect(Scheduler).toFlushUntilNextPaint(['A']);
      expect(root).toMatchRenderedOutput('Stateful: 1A');
      root.update(<App text="B" />);
      expect(Scheduler).toHaveYielded([
        'Stateful: 1',
        'Suspend! [B]',
        'Loading...',
      ]);
      expect(root).toMatchRenderedOutput('Loading...');
      instance.setState({step: 2});
      expect(Scheduler).toHaveYielded([
        'Stateful: 2',
        
        
        
        'Suspend! [B]',
      ]);
      expect(root).toMatchRenderedOutput('Loading...');
      jest.advanceTimersByTime(1000);
      expect(Scheduler).toHaveYielded(['Promise resolved [B]']);
      expect(Scheduler).toFlushUntilNextPaint(['B']);
      expect(root).toMatchRenderedOutput('Stateful: 2B');
    });
    it('suspends in a class that has componentWillUnmount and is then deleted', () => {
      class AsyncTextWithUnmount extends React.Component {