Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
type Task = () => void;
let handle: ReturnType<typeof requestAnimationFrame> | undefined;
let updateQueue: Task[] = [];
const processUpdates = (updates: Task[]) => {
for (const update of updates) {
update();
}
};
export const batchUpdate = (update: () => void) => {
updateQueue.push(update);
if (handle !== undefined) {
return;
}
handle = requestAnimationFrame(() => {
const updates = updateQueue;
updateQueue = [];
handle = undefined;
processUpdates(updates);
});
};