This article discusses the concept of tearing in React concurrent mode and its relevance to global state libraries. It explores the tradeoffs of using external stores for preventing state tearing and the purpose of using an external store in React.
Table of contents
What is tearing?Relevancy in ReactExternal stores in global state librariesHow tearing happensA practical example with startTransitionuseSyncExternalStore to the rescueWhat about React's Context APIThe Tearable Dots demoConclusionSort: