asyncredux-abort-dispatch

Abort AsyncRedux action dispatch when abortDispatch() returns true.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/pro100andrey/dar --skill asyncredux-abort-dispatch-pro100andrey
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asyncredux-abort-dispatch
Source: https://github.com/pro100andrey/dar/tree/main/.claude/skills/asyncredux-abort-dispatch
Command: npx skills add https://github.com/pro100andrey/dar --skill asyncredux-abort-dispatch-pro100andrey

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Stops an AsyncRedux (Flutter) action from dispatching by conditionally aborting the entire lifecycle, keeping state unchanged when abort is triggered.

Core Features & Use Cases

  • Abort pattern: Override abortDispatch() on ReduxAction to skip before(), reduce(), and after() when conditions are met.
  • Authentication & authorization guards: Use abortDispatch() to protect actions behind login status or roles.
  • Base action patterns: Create shared AppAction/AuthenticatedAction/AdminAction hierarchies to centralize abort logic.
  • Feature flags & idempotency: Prevent repeated or forbidden actions without UI prompts, preserving app state.
  • Internet guard & silent cancellation: Combine with AbortWhenNoInternet for offline-safe workflows (silently cancels when offline).

Quick Start

Define a ReduxAction subclass and override abortDispatch() to return true when a condition is met, causing the action to skip before(), reduce(), and after().

Frequently Asked Questions about asyncredux-abort-dispatch

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

FAQPage Schema
How do I conditionally abort an AsyncRedux action in Flutter?

To conditionally abort an AsyncRedux action in Flutter, override the abortDispatch() method in your ReduxAction subclass to return true, which skips the before(), reduce(), and after() lifecycle phases entirely.

How do I prevent Redux actions from dispatching when a user is not authenticated in Flutter?

Preventing Redux actions from dispatching when unauthenticated involves using abortDispatch() as an authorization guard, returning true when login checks fail to silently cancel the action and keep state unchanged.

What is the best way to centralize authentication guards across multiple AsyncRedux actions?

The best way to centralize authentication guards is creating shared base action patterns like AuthenticatedAction or AdminAction, overriding abortDispatch() once in the hierarchy to apply the guard to all child actions.

Can I silently cancel AsyncRedux actions during offline mode or maintenance periods?

Yes, you can silently cancel AsyncRedux actions during offline mode by combining abortDispatch() with an AbortWhenNoInternet mixin, which silently cancels workflows without UI prompts when the internet connection is lost.

Does aborting an AsyncRedux action change the Flutter app state?

No, aborting an AsyncRedux action does not change the app state. When abortDispatch() returns true, the entire action lifecycle is skipped, preserving the current state without triggering UI updates.

How do I use abortDispatch for idempotent operations and feature flags in AsyncRedux?

Use abortDispatch() for idempotent operations and feature flags by returning true when a flag is disabled or an action is repeated, preventing forbidden dispatches while maintaining state consistency.