Back to Browse

React Internals Deep Dive 8 - how does useTransition() work internally?

941 views
Jun 20, 2021
46:15

The useTransition in React 18 is so cool so I looked at the source code and see how it is implemented. Concurrent mode provides us with this lane model, it is complex and the general idea is simple, different tasks have different update priorities React will update urgent ones first. So when in transition, if it cause root to suspend, and current lane is in transition lanes, then react don't commit it. That simple. check out my blog for this episode https://jser.dev/2023-05-19-how-does-usetransition-work Hi I'm a JavaScript engineer who is not good at algorithms, and currently practicing leetCode & BFE.dev. If you are interested, maybe we can learn together.

Download

0 formats

No download links available.

React Internals Deep Dive 8 - how does useTransition() work internally? | NatokHD