Asyncredux wait condition

From marcglasberg/async_redux · View interactive version

Asyncredux wait condition is an AI agent skill from the GitHub repository marcglasberg/async_redux. Wait for an AsyncRedux state predicate in an action or test, with explicit timeout and dependency handling.

How to use this skill

Skill file

Wait for a state condition

Use waitCondition((st) => ...) on the store or in a reducer when progress depends

on state that another action may update. The predicate receives current state and

should be pure. In reducers, await the condition, then apply updates to the current

state. If the awaited operation itself can be dispatched directly and fail, prefer

dispatchAndWait and check its status when that is the real prerequisite.

The future returns the action that met the condition, or null when the condition

was already true. On the store, completeImmediately: false is available when a

test specifically expects a transition. Pass timeoutMillis when a condition might

never be met. Ensure that the action producing the state can run independently of

the waiting action, especially if both use Sequential.

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.