React Source Code
Before delving into the scheduling mechanism of React Fiber, we can get some inspiration from the requestIdleCallback API provided by the browser. Although this API is not the actual solution used by React, it provides a good basis for us to understand the concepts of "idle time" and "giving up the main thread".