asyncredux-debounce-mixin

Delay AsyncRedux action execution until user input pauses.

238|39|Updated Aug 4, 2019
One-click install
npx skills add https://github.com/marcglasberg/async_redux --skill asyncredux-debounce-mixin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asyncredux-debounce-mixin
Source: https://github.com/marcglasberg/async_redux/tree/main/.claude/skills/asyncredux-debounce-mixin
Command: npx skills add https://github.com/marcglasberg/async_redux --skill asyncredux-debounce-mixin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Debounce mixin delays action execution until after a period of inactivity, preventing unnecessary updates and API calls during rapid user input.

Core Features & Use Cases

  • Debounced actions: wait for a quiet period before executing, ideal for search-as-you-type and live validation.
  • Configurable delay: override the debounce getter to tailor the pause duration (default is 333 milliseconds).
  • Per-instance debouncing: override lockBuilder() to give independent timers to different action instances.
  • Compatibility: works with other mixins like CheckInternet, NoDialog, AbortWhenNoInternet, NonReentrant, Fresh, and Throttle.

Quick Start

Use the asyncredux-debounce-mixin to debounce a user input action by delaying execution until the user stops typing. For example, attach Debounce to your action, optionally override debounce for your delay, and override lockBuilder() for per-field timers.

Frequently Asked Questions about asyncredux-debounce-mixin

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

FAQPage Schema
How do I debounce user input in Flutter to prevent excessive API calls?

Debouncing user input in Flutter delays action execution until typing pauses, preventing excessive API calls. The Debounce mixin waits for a quiet period before running actions, which is ideal for search-as-you-type and live validation scenarios.

What is the default debounce delay duration for state management actions?

The default debounce delay duration is 333 milliseconds. You can customize this pause by overriding the debounce getter in your action to tailor the delay specifically for your input requirements.

Can I configure independent debounce timers for different input fields?

Yes, you can configure independent debounce timers for different action instances. By overriding the lockBuilder() method, you assign per-instance timers so separate input fields manage their delays independently.

Does the debounce mixin work with other async action mixins like Throttle?

Yes, the debounce mixin works with other AsyncRedux mixins like Throttle, CheckInternet, NoDialog, AbortWhenNoInternet, NonReentrant, and Fresh. It integrates seamlessly to combine debouncing with other state management behaviors.

How do I apply debouncing to a search-as-you-type action in AsyncRedux?

To apply debouncing to a search-as-you-type action in AsyncRedux, attach the Debounce mixin to your action. This delays execution until the user stops typing, canceling prior triggers to prevent unnecessary state updates.

When should I use a debounce mixin instead of a throttle mixin for input handling?

Use a debounce mixin when you want to delay execution until input activity completely stops, whereas throttle limits execution rate during continuous input. Both are compatible and manage excessive updates differently during rapid user typing.