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

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

{ handleBatch, shouldQueue, limitPolicy, }

</td><td>

{ handleBatch: (queue: ReadonlyArray<Readonly<BatchEntry; }

</td><td>

</td></tr> </tbody></table> Returns:

BatchEnhancer<TArgs, TResult>