The type of the returned value.
Reactive context; defaults to the shared global context.
The function to run outside the tracking system.
The value returned by fn.
const state = signal({ count: 0, label: "Count" });
const dispose = effect(() => {
// reads `label` without subscribing
const label = untrack(() => state.label);
console.log(`${label}: ${state.count}`);
});
// does not trigger the effect
state.label = "Total";
// triggers the effect
state.count += 1;
// later …
dispose();
Runs a function without tracking property accesses.
Reads performed inside the callback will not subscribe the current effect to the accessed properties. Useful for breaking cycles or performing intentional non-reactive reads. Writes made inside still count as the effect's own, so they do not re-run it.
The context is determined by
this, following the same rules as signal.