UseReduce
katanakit-js / useReduce
Function: useReduce()
Section titled “Function: useReduce()”function useReduce<T, U>( array, reducer, initial): U;Defined in: core/services/array.service.ts:505
Folds into a single value. See ArrayService.useReduce.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
U |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
array |
NullableArray<T> |
reducer |
(accumulator, item, index) => U |
initial |
U |
Returns
Section titled “Returns”U