React · Senior · Question 18 of 75
What is tearing in concurrent rendering?
- ✓Correct answer: Different parts of the UI show different versions of an external mutable store
- 2An animation glitch during scrolling caused by long tasks on the main thread
- 3A hydration error where part of the DOM is removed and redrawn
Explanation
If rendering is interrupted and an external store (not React state) changes in the meantime, some components read the old value and others the new one. useSyncExternalStore protects against this. That's why third-party stores should subscribe through it rather than useEffect + useState.