UNPKG

scrivito

Version:

Scrivito is a professional, yet easy to use SaaS Enterprise Content Management Service, built for digital agencies and medium to large businesses. It is completely maintenance-free, cost-effective, and has unprecedented performance and security.

14 lines (10 loc) 357 B
import { collectInListAndSchedule, nextTick } from 'scrivito_sdk/common'; import { withBatchedUpdates } from 'scrivito_sdk/state'; type Callback = () => void; export const addBatchUpdate = collectInListAndSchedule<Callback>( nextTick, (callbacks) => { withBatchedUpdates(() => callbacks.forEach((callback) => callback())); return []; }, );