Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
TanStack Pacer
[go: Go Back, main page]

Docs
CodeRabbit
Cloudflare
Railway
Clerk
AG Grid
SerpAPI
Netlify
WorkOS
OpenRouter
Prisma
Unkey
Electric
Sentry
CodeRabbit
Cloudflare
Railway
Clerk
AG Grid
SerpAPI
Netlify
WorkOS
OpenRouter
Prisma
Unkey
Electric
Sentry
Debouncer API Reference
Throttler API Reference
Rate Limiter API Reference
Queue API Reference
Batcher API Reference

Timing and pressure control

TanStackPacer

beta

Control when work is allowed to happen.

Pacer gives JavaScript apps typed primitives for debouncing, throttling, rate limiting, queuing, and batching so expensive work runs at the speed the product can actually afford.

Total DownloadsWeekly DownloadsGitHub Stars
Read the docs

Noisy input

debounce search, autosave, validation

Fast events

throttle resize, scroll, pointer work

Async pressure

queue, batch, limit, cancel

debounced search

raw input

router loader

paced query

router loader

input events

0

executed searches

1

result

debounce

Router loaders, preload, search params

Why Pacer

Performance problems often start as scheduling problems.

The app does not need every keypress, scroll tick, resize event, network write, or background task to run immediately. Pacer gives each workflow the timing policy it deserves.

Debounce the work that should wait.

Search, validation, autosave, and expensive calculations can wait for intent instead of firing on every keystroke.

Throttle the work that should pace itself.

Scroll, resize, pointer, sensor, and realtime events can stay responsive without flooding the app.

Queue the work that needs order.

Run async tasks with FIFO, LIFO, priority, pause/resume, cancellation, retries, and concurrency control.

Batch the work that should travel together.

Collect writes, logs, telemetry, or cache operations into sensible flushes instead of shipping every item alone.

1

Accept

The primitive receives calls from UI events, async workflows, or service boundaries.

2

Pace

Timing, rate, concurrency, ordering, and batching rules decide when work may run.

3

Signal

Reactive state reports idle, pending, running, queued, success, error, and cancelled work.

4

Flush

Manual controls can flush, cancel, pause, resume, retry, or drain the current workload.

Control lifecycle

Accept the work now. Run it when it makes sense.

Every primitive exposes state and controls, so the product can show pending work, cancel stale tasks, flush intentionally, or pause a queue before it becomes user-visible chaos.

Async workflows

Queues should be observable, cancellable, and boring.

Pacer handles sync and async execution, abort controllers, retries, ordering, queue state, concurrency, and manual controls without making each feature team invent its own scheduler.

queue.add(uploadFile)
queue.setOptions({ concurrency: 3, order: "fifo" })
queue.subscribe(state => state.status)

pause/resume

stop the queue without losing work

abort

cancel stale async tasks cleanly

retry

recover transient failures

flush

run the pending batch intentionally

Framework adapters

Core timing primitives, reactive UI adapters.

Use Pacer in plain TypeScript, then connect the same primitives to framework state through adapters when the UI needs to react to queue, pending, error, or success state.

ReactPreactSolidAngularVanilla

Feature surface

One timing toolbox instead of scattered timers.

Debounce, throttle, rate limit, queue, batch, flush, cancel, pause, resume, retry, prioritize, and control concurrency from one typed set of primitives.

Open source ecosystem

Pacer is built for the messy edges of real app work.

Maintainers, adapters, examples, partners, and GitHub sponsors keep the timing primitives grounded in the places apps actually get overwhelmed.

GitHub Sponsors

Wow, you've come a long way!
Only one thing left to do...