Primitives

A low-level toolbox for Angular signals: the small, composable helpers you reach for once you are building on signals for real, from deep reactive stores to concurrent UI that stops flashing spinners.

@mmstack/primitivesnpm

#Install

npm install @mmstack/primitives

Every value-producing helper here is a pure derivation. There is no effect() inside, no RxJS bridge, and no zone churn, so you can compose them in computed() graphs without thinking about side-effect lifetimes. The effect-shaped helpers (sensors, tabSync, nestedEffect) clean up through DestroyRef.

#What's in the box

The library splits into a handful of families. Skim the table for the one that matches what you are trying to do; each row links to its page.

You want toReach for
Write into a big object in place, or bind a slice of a signal two-waySignal variants: mutable, derived, toWritable
Turn a whole object into a tree of independently reactive signalsStore: store, mutableStore, forkStore, opLog
Map an array or record into stable, per-item derived valuesMapped collections: indexArray, keyArray, mapObject
Debounce or throttle a signal, or wait for a conditionTiming: debounced, throttled, until
Persist a signal, sync it across tabs, or add undo and redoStorage & history: stored, tabSync, withHistory
Read browser state (media query, element size, network, pointer) as signalsSensors
Compose signal transforms without reaching for RxJS or effectsPipelines: piped + operators
Time-slice heavy work or reuse allocations on a hot pathPerformance: chunked, pooled
Hold the UI through async work so it stops flashing spinnersTransitions & suspense: *mmTransition, <mm-suspense>, latest, deferredValue
Keep a hidden tab mounted and pause its background workKeep-alive & pausing: *mmActivity, pausable*