Загрузка видео...
Не удалось загрузить видео
useDeferredValue in React
128,051 просмотров • 1 год назад •via X (Twitter)
Комментарии: 9

Alex Sidorenko1 год назад
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 Čolse1 год назад
Why don't you just set a css variable?

Sahil Zambani1 год назад
If useState can make it happen as well, why to use useDeferredValue

Alex Sidorenko1 год назад
Performance

no more big d4ta1 год назад
Nice!

Kazuma Horiike1 год назад
Didn’t know that! Thanks!

Harish1 год назад
Nice, thanks for sharing

John Doe1 год назад
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 год назад
Yep, since React 18
