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 to | Reach for |
|---|---|
| Write into a big object in place, or bind a slice of a signal two-way | Signal variants: mutable, derived, toWritable |
| Turn a whole object into a tree of independently reactive signals | Store: store, mutableStore, forkStore, opLog |
| Map an array or record into stable, per-item derived values | Mapped collections: indexArray, keyArray, mapObject |
| Debounce or throttle a signal, or wait for a condition | Timing: debounced, throttled, until |
| Persist a signal, sync it across tabs, or add undo and redo | Storage & history: stored, tabSync, withHistory |
| Read browser state (media query, element size, network, pointer) as signals | Sensors |
| Compose signal transforms without reaching for RxJS or effects | Pipelines: piped + operators |
| Time-slice heavy work or reuse allocations on a hot path | Performance: chunked, pooled |
| Hold the UI through async work so it stops flashing spinners | Transitions & suspense: *mmTransition, <mm-suspense>, latest, deferredValue |
| Keep a hidden tab mounted and pause its background work | Keep-alive & pausing: *mmActivity, pausable* |