Home
Using Smart NgRX
Demo Walkthrough
API
@smarttools/smart-ngrx / Function

bufferIndexes

This is an internal function that is used by the Effects to buffer the loadByIndexes actions coming into an effect so that we can dispatch indexes independently but send all the indexes to the server in a single request.

NOTE: bufferAction assumes an array of indexes is passed to the action it is buffering.

Presentation

function bufferIndexes(
  bufferTime: number = 1,
): (source: Observable<IndexesProp>) => Observable<IndexesProp>;

Returns

(source: Observable<IndexesProp>) => Observable<IndexesProp> -

The buffered indexes.

Parameters

NameTypeDescription
bufferTime
number

The time to buffer the ids before sending them to the server.