Skip to content

freeze

freeze(): () => void

Defined in: aberdeen.ts:154

Pause processing of reactive updates until the returned thaw function is called.

While frozen, changes to observed data still accumulate, but no re-renders run. Freezes stack: if there are multiple outstanding freezes, redraws resume only once the last one is thawed. This is useful to batch an async burst of changes into a single update pass, or to hold the UI steady (e.g. the dev tools use it for “freeze redraws”).

A function that releases this freeze. Calling it more than once has no effect.

() => void

const thaw = A.freeze();
// ...make many changes without intermediate redraws...
thaw(); // redraws run now (if no other freezes remain)