TanStack Pacer is a lightweight, type-safe library for controlling function execution timing through debouncing, throttling, rate limiting, queuing, and batching. It provides framework-agnostic core classes with dedicated React hooks at multiple abstraction levels (instance, callback, state, value).
When to use: Debouncing search input, throttling scroll/resize handlers, enforcing API rate limits, queuing async tasks with concurrency control, batching multiple operations into single requests.
When NOT to use: Simple one-off delays (use setTimeout), server-side rate limiting at the infrastructure level (use middleware/API gateway), complex job scheduling (use a task queue like BullMQ).
TanStack Pacer zur Ratenbegrenzung, Drosselung, Entprellung und asynchronen Warteschlangen. Verwenden Sie diese Option, wenn Sie die Ausführungshäufigkeit steuern, API-Ratenlimits verwalten, Benutzereingaben entprellen oder asynchrone Aufgaben in die Warteschlange stellen. Verwendung für Schrittmacher, Drosselung, Entprellung, Ratenbegrenzung, Warteschlange, asynchrone Drosselung, Ratenbegrenzung. Quelle: oakoss/agent-skills.