In this video we started with a simple React App with a timer to setState in hooks. By analyzing the call stack, we can see that
1. same as initial mount, a new fiber tree is created repeatedly
2. during complectWork phase, a fiber node is marked if it needs to update, and these fiber nodes are connected in a linked list(effect list), which starts at the root.
3. only the fiber node in the effect list are checked and committed the update work.
My blog post for this episode https://jser.dev/2023-07-18-how-react-rerenders/
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.