const mapReduce: <R, T>(
calls?:
| string
| number
| DeferredCall<any>
| ArrowFunction
| LiveElement<ArrowFunction>[]
| ReactElementInterop
| LiveNode<any>[],
map?: (t: T) => R,
reduce?: (a: R, b: R) => R,
then?: (r: R) => LiveElement,
fallback?: NonNullable<R>,
key?: Key,
) => DeferredCall<() => void>
Reduce values from a subtree, using the given map(...)
and reduce(...)
.
packages / live / src / builtin.ts