concatMap()
Maps each outer value to an inner store and runs inners sequentially (queue while busy).
Signature
ts
function concatMap<A, B>(fn: (value: A) => Store<B>): StoreOperator<A, B | undefined>
function concatMap<A, B>(
fn: (value: A) => Store<B>,
opts: { initial: B; maxBuffer?: number },
): StoreOperator<A, B>Parameters
| Parameter | Type | Description |
|---|---|---|
fn | (value: A) => Store<B> | Inner store factory. |
opts | { initial?: B; maxBuffer?: number } | { initial: B } narrows type; maxBuffer drops oldest queued outers when exceeded (default: unlimited). |
Returns
StoreOperator<A, B | undefined> or B with initial.
Options / Behavior Details
- Tier 2: Reactive; no eager
fn(outer.get()).