How does useDeferredValue work under the hood?
- React uses Concurrent Rendering to defer updates to the deferred value.
- When the original value changes, React calculates the deferred value with lower priority.
- If higher-priority tasks (e.g., user input) occur, React processes them first and updates the deferred value when there’s idle time.