tanstack-pacer

Debounce, throttle, rate limit, queue, and batch function calls.

3|Updated May 11, 2026
One-click install
npx skills add https://github.com/JeromyJSmith/lattice-platform --skill tanstack-pacer-jeromyjsmith
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-pacer
Source: https://github.com/JeromyJSmith/lattice-platform/tree/main/.agents/skills/skills/tanstack-pacer
Command: npx skills add https://github.com/JeromyJSmith/lattice-platform --skill tanstack-pacer-jeromyjsmith

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of inconsistent or excessive function calls by giving you reliable, framework-agnostic control over when work runs, especially under rapid user interaction.

Core Features & Use Cases

  • Debouncing, throttling, and rate limiting to manage bursty inputs like search typing, scroll events, and API calls.
  • Queuing and batching to serialize tasks (like uploads) and group items (like analytics) for efficiency.
  • React hooks and class/factory APIs for type-safe timing control in both UI and non-UI code.

Quick Start

Use the tanstack-pacer skill to debounce a search request so it only fires after the user stops typing for 300 milliseconds.

Frequently Asked Questions about tanstack-pacer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debounce a search input in React to prevent excessive API calls?

To debounce a search input in React, use timing utilities to delay function execution until typing pauses, such as waiting 300 milliseconds after the last keystroke before firing the API request. This prevents excessive calls during rapid user interaction.

What is the difference between throttling and rate limiting for async control?

Throttling limits async control by ensuring a function executes at most once per fixed time interval, while rate limiting restricts the total number of executions allowed within a specific window. Both prevent poorly timed or excessive executions under rapid interaction.

Can I use these batching and queuing utilities in non-React backend code?

Yes, you can use these batching and queuing utilities in non-React backend code. They provide class and factory APIs for type-safe timing control, allowing you to serialize tasks like sequential uploads and group items like analytics without requiring React hooks.

What's the best way to group analytics events and submit them in batches?

The best way to group analytics events is using batching utilities to collect items over time and submit them together for efficiency. This manages timing and flush behaviors, ensuring grouped log submissions or analytics are executed reliably without overwhelming the network.

How do you handle scroll event throttling in a React application?

To handle scroll event throttling in a React application, apply throttling hooks to restrict the function execution rate. This ensures the scroll handler fires at a controlled, steady interval rather than executing excessively on every pixel change, maintaining UI smoothness.

When do I need to manage concurrency and flush behaviors for queued tasks?

You need to manage concurrency and flush behaviors for queued tasks when serializing operations like sequential uploads. By applying queuing utilities with deterministic options, you control task timing, limit concurrent executions, and manually flush or cancel pending work to protect API endpoints.