Redux

Virtual DOM ⇒ Fiber

GitHub - acdlite/react-fiber-architecture: A description of React's new core algorithm, React Fiber

A primary goal of Fiber is to enable React to take advantage of scheduling. Specifically, we need to be able to

A fiber represents a unit of work.

To go further, let's go back to the conception of React components as functions of data, commonly expressed as

v = f(d)

It follows that rendering a React app is akin to calling a function whose body contains calls to other functions, and so on. This analogy is useful when thinking about fibers.

The way computers typically track a program's execution is using the call stack. When a function is executed, a new stack frame is added to the stack. That stack frame represents the work that is performed by that function.

The advantage of reimplementing the stack is that you can keep stack frames in memory and execute them however (and whenever) you want. This is crucial for accomplishing the goals we have for scheduling.

Structure of a fiber