Signals Overview
@ecopages/signals is a renderer-agnostic signals package that can be used standalone or underneath Radiant.
Its model is based on the TC39 Signals proposal, with a smaller surface area and a few convenience helpers for real application code today.
Scope
This package provides:
State<T>for writable valuesComputed<T>for lazily derived valueseffect(...)for reactive side effectswatch(...)for observing derived values with previous-value accessuntrack(...)andpeek(...)for non-tracking readssubtle.Watcherpluswatchedandunwatchedhooks for low-level invalidation workflowscreateStore(...)andsnapshot(...)for deep reactive object and array state
Design Position
This package is intentionally renderer-agnostic.
- It does not know about JSX.
- It does not know about Radiant components.
- It is meant to work standalone or underneath adapters in those packages.
TC39 Relationship
The package tracks the same broad model around:
StateandComputed- lazy pull-based recomputation with caching
- automatic dependency discovery during computed evaluation
- custom equality functions
- untracked reads as an escape hatch
It is not a drop-in implementation of the current proposal draft.
How It Connects To Radiant
@ecopages/radiant depends on @ecopages/signals directly, so installing radiant brings this package transitively. You do not need a separate signals install for the standard radiant + jsx setup.
Radiant builds on top of this package in two main ways:
@signalturns a host field into a real writable signalcreateResource(...)from@ecopages/radiantties async state to a host lifecycle
That split is intentional:
@ecopages/signalsstays renderer-agnostic@ecopages/radiantadds host-aware behavior on top of signals
Next Pages
- See Signals State & Computed
- See Signals Effects
- See Signals Stores
- See Resources