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

Alex Sidorenko2 лет назад
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 лет назад
Why don't you just set a css variable?

Sahil Zambani2 лет назад
If useState can make it happen as well, why to use useDeferredValue

Alex Sidorenko2 лет назад
Performance

no more big d4ta2 лет назад
Nice!

Kazuma Horiike2 лет назад
Didn’t know that! Thanks!

Harish2 лет назад
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
