Home > @uniformdev/canvas > createBatchEnhancer

createBatchEnhancer() function

Creates an enhancer that batches up all enhancements for a composition into a set of promises, and then handles them all in a single batch. Used to reduce the number of HTTP requests needed to fulfill layout enhancements when a layout uses many resources from other systems.

Signature:

Parameters

ParameterTypeDescription
{ handleBatch, shouldQueue, limitPolicy, }{ handleBatch: (queue: ReadonlyArray<Readonly<BatchEntry; }

Returns:

BatchEnhancer<TArgs, TResult>