index.signal
signal<T>(initialValue): Signal<T>
Creates a reactive signal holding an initial value.
| Name | Description |
|---|---|
T |
The type of value held by the signal. |
| Name | Type | Description |
|---|---|---|
initialValue |
T |
The initial value to store in the signal. |
Signal<T>
A reactive Signal container instance.
Remarks
Signals are the fundamental unit of state in the reactivity engine.
Accessing .value records dependencies in active effects or computeds, and mutating .value
schedules reactions for downstream subscribers.
Example