Video wird geladen...
Video konnte nicht geladen werden
useDeferredValue in React
128,051 Aufrufe • vor 1 Jahr •via X (Twitter)
9 Kommentare

Alex Sidorenkovor 1 Jahr
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 Čolsevor 1 Jahr
Why don't you just set a css variable?

Sahil Zambanivor 1 Jahr
If useState can make it happen as well, why to use useDeferredValue

Alex Sidorenkovor 1 Jahr
Performance

no more big d4tavor 1 Jahr
Nice!

Kazuma Horiikevor 1 Jahr
Didn’t know that! Thanks!

Harishvor 1 Jahr
Nice, thanks for sharing

John Doevor 1 Jahr
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 Sidorenkovor 1 Jahr
Yep, since React 18
