Q70: What is Tearing in concurrent rendering and how does useSyncExternalStore prevent it?

Tearing occurs when a visual state update causes different components on screen to display different versions of data for the exact same state variable because a store update occurred mid-render during concurrent yielding. useSyncExternalStore forces synchronous reads during external store updates to guarantee consistency across all components.

Key Takeaways
  • Tearing causes visual UI inconsistencies when external store data mutates mid-render.
  • useSyncExternalStore guarantees consistent synchronous store snapshots during rendering.
Knowledge Check

What visual defect is referred to as 'Tearing' in concurrent user interface rendering?