Asyncredux actions no state change

From marcglasberg/async_redux · View interactive version

Asyncredux actions no state change is an AI agent skill from the GitHub repository marcglasberg/async_redux. Implement AsyncRedux actions that coordinate other actions, perform side effects, or leave state unchanged.

How to use this skill

Skill file

Return no state change

Return null to leave state unchanged. Use a reducer returning AppState? for

synchronous work or Future<AppState?> when the action must await work. An action

can still update state indirectly by dispatching other actions.

Use dispatchAndWait when a caller needs the parent action to finish after a child.

A child UserException can produce a failed status without throwing to the parent,

so check that status before dependent work. Use dispatchAll for independent child

actions that may keep running.

This action uses the base class from the setup skill.

class FlushDrafts extends AppAction {
  FlushDrafts(this.flush);
  final Future<void> Function() flush;

  @override
  Future<AppState?> reduce() async {
    await flush();
    return null;
  }
}

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.