Loading video...

Video Failed to Load

Go Home

useDeferredValue in React

128,051 views • 1 year ago •via X (Twitter)

9 Comments

Alex Sidorenko's profile picture
Alex Sidorenko1 year 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 Čolse's profile picture
Boko Čolse1 year ago

Why don't you just set a css variable?

Sahil Zambani's profile picture
Sahil Zambani1 year ago

If useState can make it happen as well, why to use useDeferredValue

Alex Sidorenko's profile picture
Alex Sidorenko1 year ago

Performance

no more big d4ta's profile picture
no more big d4ta1 year ago

Nice!

Kazuma Horiike's profile picture
Kazuma Horiike1 year ago

Didn’t know that! Thanks!

Harish's profile picture
Harish1 year ago

Nice, thanks for sharing

John Doe's profile picture
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 Sidorenko's profile picture
Alex Sidorenko1 year ago

Yep, since React 18

Related Videos