React integration
External store consistency
React may restart a transition as blocking if the snapshot changes before commit.
Formal Syntax & Structure
react syntaxreact
useSyncExternalStore(subscribe, getSnapshot)Working Example
Example Snippetreact
useSyncExternalStore(subscribe, getSnapshot)