filmov
tv
React Internals Deep Dive 5 - How does useState work internally?

Показать описание
In this video, we'll dig into how useState() works, in a nutshell
1. each useState call creates a hook node in a linked list on Fiber,
2. each hook node has a update queue (linked list )holding the updates, also the current state
3. for the initial mount, useState() just sets things up and create a closure setState to trigger update
4. setState() calls creates update nodes in 2 and schedule a rerender
5. in rerender, update queue will be processed and current state is updated.
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.
1. each useState call creates a hook node in a linked list on Fiber,
2. each hook node has a update queue (linked list )holding the updates, also the current state
3. for the initial mount, useState() just sets things up and create a closure setState to trigger update
4. setState() calls creates update nodes in 2 and schedule a rerender
5. in rerender, update queue will be processed and current state is updated.
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.
React Internals Deep Dive 5 - How does useState work internally?
High-school student makes React a million times faster
React Internals Deep Dive 1 - Overview (2023)
React Internals Deep Dive - how does React bailout work internally in reconciliation?
How Does React Actually Work? React.js Deep Dive #1
Do not wake the lady of the lake 🌊 #thalassophobia #shorts
There’s always a bigger fish ! #shorts #creepy #magnapinna #surrealism #surreal #thalassophobia
The Story of React Query
How to Handle App Center Retirement | React Universe On Air #43
Teasing and exploiting my camera(man) #shorts #outdoors #camping
Vector databases are so hot right now. WTF are they?
This Is How Quickly It Imploded 😞 (Titan)
Looking Under the Hood of JavaScript
React Internals Deep Dive 32 - How does useId() works internally in React?
Things you didn't know about re-rendering in React
React Internals Deep Dive 24 - How does act() work internally in React?
The Creepiest Things Ever Found In The Woods #shorts #creepy
React Internals Deep Dive 4 - How does useEffect work internally?
React Internals Deep Dive 1 - Hello World! Debugging
React Internals Deep Dive 3 - How doest React re-render internally?
React Internals Deep Dive 7 - How does Suspense work internally?
How React JS Works? ReactJS Explained #shorts
5. React Native Internals
React Internals: Introduction to React.js diff “algorithm”
Комментарии