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).toFlushAndYield(['default']);
    expect(root).toMatchRenderedOutput('default');
    act(() => setValue('new value'));
    expect(Scheduler).toHaveYielded(['Suspend! [new value]', 'Loading...']);
    jest.advanceTimersByTime(1000);
    expect(Scheduler).toHaveYielded(['Promise resolved [new value]']);
    expect(Scheduler).toFlushAndYield(['new value']);
    expect(root).toMatchRenderedOutput('new value');
  });
  it('updates memoized child of suspense component when context updates (forwardRef)', () => {
    const {forwardRef, useContext, createContext, useState} = React;
    const ValueContext = createContext(null);
    const MemoizedChild = forwardRef(() => {
      const text = useContext(ValueContext);
      try {
        TextResource.read([text, 1000]);
        Scheduler.unstable_yieldValue(text);
        return text;
      } catch (promise) {
        if (typeof promise.then === 'function') {
          Scheduler.unstable_yieldValue(`Suspend! [${text}]`);
        } else {
          Scheduler.unstable_yieldValue(`Error! [${text}]`);
        }
        throw promise;
      }
    });
    let setValue;
    function App({children}) {
      const [value, _setValue] = useState('default');