Loading video...
Video Failed to Load
useDeferredValue in React
128,108 views • 2 years ago •via X (Twitter)
9 Comments

Alex Sidorenko2 years ago
The component that receives the prop should be memoized (otherwise, it'll keep re-rendering when the non-deferred state updates and performance will remain the same)

Boko Čolse2 years ago
Why don't you just set a css variable?

Sahil Zambani2 years ago
If useState can make it happen as well, why to use useDeferredValue

Alex Sidorenko2 years ago
Performance

no more big d4ta2 years ago
Nice!

Kazuma Horiike2 years ago
Didn’t know that! Thanks!

Harish2 years ago
Nice, thanks for sharing

John Doe1 year ago
Is that an actual react hook in 19? I always built something similar on my own and called in something about denouncing, but that’s sick if it’s officially a part of React.

Alex Sidorenko1 year ago
Yep, since React 18
