React · Senior · Question 54 of 75
What does useDeferredValue(query, "") with an initial value change (React 19)?
- ✓Correct answer: On the first render it returns
""and then re-renders in the background with the real value, avoiding a slow initial render - 2It debounces the value by 200ms
- 3It makes the value read-only
Explanation
Without initialValue, the first render uses the real value immediately. The initial value is useful when the deferred render is expensive, e.g. a filtered list.