Skip to content

Scheduler

One frame-aligned scheduler is the clock of the framework. It replaces domScheduler, the RafService loop, SmartQueue and the view-transition scheduler of @studiometa/ui.

frame start (rAF)
  1. tick        — fan out to the subscribers of the clock
  2. read        — measure: layout reads only
  3. write       — mutate: DOM writes only
style / layout / paint

between frames, on its own turns
  background     — time-sliced lane: mount and update lifecycle work,
                   mutation-record processing, manifest loading

The exports

From a component, $read() and $write() tie tasks to the instance so unmount cancels them. See Instance methods.

The scheduler explains the lanes, the thrash rule and why afterWrite is gone.

MIT Licensed