Skip to content

Function: untracked()

ts
function untracked<T>(fn: () => T): T;

Defined in: @preact/signals-core:

Run a callback function that can access signal values without subscribing to the signal updates.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
fn() => TThe callback function.

Returns

T

The value returned by the callback.