tanstack-pacer

Installation
SKILL.md

TanStack Pacer

Overview

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).

Quick Reference

Pattern API Key Points
Debounce function Debouncer / debounce(fn, opts) Waits for inactivity; no maxWait option by design
Throttle function Throttler / throttle(fn, opts) Even spacing; leading and trailing both default true
Rate limit RateLimiter / rateLimit(fn, opts) Fixed or sliding window; rejects calls over limit
Queue items Queuer / queue(fn, opts) FIFO default; supports LIFO, priority, expiration
Async queue AsyncQueuer / asyncQueue(fn, opts) Concurrency control, retry, error callbacks
Related skills
Installs
46
GitHub Stars
11
First Seen
Feb 20, 2026