# selectors

Predicate functions for querying async-process state out of a [`Store`](https://www.hyperfrontend.dev/docs/libraries/state-machine/store/#api-Store) snapshot.

[`notStarted`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-notStarted), [`inProgress`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-inProgress), [`done`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-done), [`successful`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-successful), [`failed`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-failed), [`retrying`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-retrying), [`restarting`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-restarting), [`halted`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-halted), [`paused`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-paused), and [`cancelled`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-cancelled) answer single-question predicates over a process state. [`derivedState`](https://www.hyperfrontend.dev/docs/libraries/state-machine/selectors/#api-derivedState) returns the canonical phase string for a process so UI code can render a single source-of-truth label instead of testing each predicate. All selectors are pure and work over any state slice that conforms to the async-process shape; they are not tied to a specific store instance.

---

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