useSyncExternalStore: The Right Way to Subscribe to External StatePart 1•3 min read•Before useSyncExternalStore, subscribing to an external store in a React component caused tearing — different parts of the tree reading different versions of the store in the same render. This hook exists to fix that, and it is the right foundation for any custom store.