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.


root.update(<App shouldSuspend={true} step={1} />);
      
      expect(Scheduler).toFlushAndYieldThrough(['A1']);
      
      
      React.startTransition(() => {
        root.update(<App shouldSuspend={false} step={2} />);
      });
      
      interrupt();
      expect(Scheduler).toFlushAndYieldThrough([
        
        'A1',
        'Suspend! [Async]',
        'Loading...',
        'B1',
      ]);
      
      expect(root).toMatchRenderedOutput('A0B0C0');
      
      
      
      
      
      expect(Scheduler).toFlushAndYield(['A2', 'B2', 'C2']);
      expect(root).toMatchRenderedOutput('A2B2C2');
    },
  );
  it('mounts a lazy class component in non-concurrent mode', async () => {
    class Class extends React.Component {