frame
One screen update; browsers aim for about 60 frames per second, which leaves roughly 16 milliseconds to do each frame work.
In more detail
If JavaScript runs longer than that, the browser skips frames and animations stutter or input lags. requestAnimationFrame runs code just before the next frame.
Example
Keeping React renders short, virtualising long lists and using transitions help keep the frame rate smooth.Related terms
- paint — The rendering stage that records how to fill in each box's pixels: text, colours, borders, shadows and images.
- main thread — The first thread a program starts with; in a browser page it also runs JavaScript and handles input, layout and painting.
- list virtualization — Rendering only the rows of a long list that are currently visible, plus a few extra, instead of creating DOM nodes for every item.
Taught in
- React Fiber Architecture: Work Units, Priority And Commits — React 19 & Modern Component Architecture
- useLayoutEffect vs useEffect: Painting And Synchronous Reads — React 19 & Modern Component Architecture
- useSyncExternalStore: Tearing-Free Store Subscriptions — React 19 & Modern Component Architecture
- Concurrent Mode: Interruptible Work And Lane Priority — React 19 & Modern Component Architecture
- useTransition: Non-Blocking State Updates for Fluid UI — React 19 & Modern Component Architecture
- Virtualization: Rendering Infinite Datasets Efficiently — React 19 & Modern Component Architecture