Skip to main content

Computed

A computed signal that automatically tracks dependencies and recalculates when dependencies change.

Overview

Computed signals are reactive values derived from other signals:

const count = createSignal(0);
const double = createComputed(() => count() * 2);

Factory Functions

function createComputed<T, TOwner = void>(
computation: () => T,
owner?: TOwner,
): Computed<T>;