正在加载视频...
视频加载失败
useDeferredValue in React
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
