正在加载视频...

视频加载失败

useDeferredValue in React

128,051 次观看 • 1 年前 •via X (Twitter)

9 条评论

Alex Sidorenko 的头像
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 Čolse 的头像
Boko Čolse1 年前

Why don't you just set a css variable?

Sahil Zambani 的头像
Sahil Zambani1 年前

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

Alex Sidorenko 的头像
Alex Sidorenko1 年前

Performance

no more big d4ta 的头像
no more big d4ta1 年前

Nice!

Kazuma Horiike 的头像
Kazuma Horiike1 年前

Didn’t know that! Thanks!

Harish 的头像
Harish1 年前

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

相关视频