UseTransition hook overview on practice
ฝัง
- เผยแพร่เมื่อ 30 ก.ย. 2024
- React offers a new built-in useTransition Hook
By default, all updates in React are considered urgent. That could create a problem when quick updates are slowed down by heavy updates.
However, starting React 18 and the new concurrency features, you can mark some updates as interruptible and non-urgent - so-called transitions. That's especially useful with heavy UI updates, like filtering a big list.
useTransition is the hook that lets you access concurrent mode features inside of the React component.
Author: Aleksandr Miakin