Загрузка видео...

Не удалось загрузить видео

На главную

useDeferredValue in React

128,108 просмотров • 2 лет назад •via X (Twitter)

Комментарии: 9

Фото профиля Alex Sidorenko
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 Čolse
Boko Čolse2 лет назад

Why don't you just set a css variable?

Фото профиля Sahil Zambani
Sahil Zambani2 лет назад

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

Фото профиля Alex Sidorenko
Alex Sidorenko2 лет назад

Performance

Фото профиля no more big d4ta
no more big d4ta2 лет назад

Nice!

Фото профиля Kazuma Horiike
Kazuma Horiike2 лет назад

Didn’t know that! Thanks!

Фото профиля Harish
Harish2 лет назад

Nice, thanks for sharing

Фото профиля John Doe
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 Sidorenko
Alex Sidorenko1 год назад

Yep, since React 18

Похожие видео