batch
Edit this pagefunction batch<T>(fn: () => T): T;
This is a low level API that is used by Solid to batch updates. It holds executing downstream computations within the block until the end to prevent unnecessary recalculation. Although the computations listening for changes to the signal are not yet notified, accessing the value of a signal set within the batch will still return the updated value (in Solid versions >=1.4).
Solid Store's set method, Mutable Store's array methods, and Effects (unless it is defined outside a root) automatically wrap their code in a batch. This is useful in user-land for when you want to batch a set of computations that are not wrapped in a batch already.