Why useSyncExternalStore Needs a New Snapshot for UI Updates in React
If you're using React's useSyncExternalStore Hook, it's crucial to know that it needs a completely new data snapshot to display changes on screen, not just an alteration within the existing snapshot object. Also, the initial data value must match what was rendered on the server when using SSR.