# async-operation

State-tracking wrapper for a single asynchronous process.

[`AsyncOperation`](https://www.hyperfrontend.dev/docs/libraries/state-machine/async-operation/#api-AsyncOperation) is the runtime object that owns the state of one async process: not-started, in-progress, paused, done, failed, retrying, etc. It dispatches the actions in [`/actions`](https://www.hyperfrontend.dev/docs/libraries/state-machine/actions.md) against the reducer and exposes selectors so consumers can query the process state without importing the reducer directly. [`AsyncProcess`](https://www.hyperfrontend.dev/docs/libraries/state-machine/async-operation/#api-AsyncProcess) is the data shape held inside the operation, useful when the operation is composed into larger structures or persisted. Reach for the higher-level [`/coordinated-async-operation`](https://www.hyperfrontend.dev/docs/libraries/state-machine/coordinated-async-operation.md) when several related async processes need to be orchestrated together.

---

Canonical page: https://www.hyperfrontend.dev/docs/libraries/state-machine/async-operation/
This file: https://www.hyperfrontend.dev/docs/libraries/state-machine/async-operation.md
Documentation index: https://www.hyperfrontend.dev/llms.txt
