double buffering

Keeping two copies of something, one on screen and one being prepared, then swapping them when the new one is ready.

In more detail

React keeps a current fiber tree matching the screen and builds a workInProgress tree off-screen during rendering. When the work is finished and committed, a pointer swap makes the new tree current and the old one becomes the alternate for next time. Unfinished work never shows on screen.

Related terms

Taught in

References