## React version
React version: 18.3.0-next-b0671f9ea-20230130

## Problem
In `StrictMode`,  when using hydrateRoot to render a component that using `useSyncExternalStore` it seems that useSES will do hydration twice. 

But in second hydration process,  useSES does not use the result of `getServerSnapshot` as initial state, which will cause hydration error.

This problem will only happen in `development` mode, 

## Reproduce
Link to code example:
https://codesandbox.io/s/useses-18-3-rojznv

It works well in react 18.2
https://codesandbox.io/s/useses-18-2-13iskc




hook.baseState = newBaseState;
    hook.baseQueue = newBaseQueueLast;
    queue.lastRenderedState = newState;
  }
  if (baseQueue === null) {
    
    
    queue.lanes = NoLanes;
  }
  const dispatch: Dispatch<A> = (queue.dispatch: any);
  return [hook.memoizedState, dispatch];
}
function rerenderReducer<S, I, A>(
  reducer: (S, A) => S,
  initialArg: I,
  init?: I => S,
): [S, Dispatch<A>] {
  const hook = updateWorkInProgressHook();
  const queue = hook.queue;
  if (queue === null) {
    throw new Error(
      'Should have a queue. This is likely a bug in React. Please file an issue.',
    );
  }
  queue.lastRenderedReducer = reducer;
  
  
  const dispatch: Dispatch<A> = (queue.dispatch: any);
  const lastRenderPhaseUpdate = queue.pending;
  let newState = hook.memoizedState;