@hyperfrontend/state-machine/selectors

selectors

Predicate functions for querying async-process state out of a Store snapshot.

notStarted, inProgress, done, successful, failed, retrying, restarting, halted, paused, and cancelled answer single-question predicates over a process state. 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.

API Reference

Variables

§type

cancelled

Selector that checks if operation was cancelled.
§type

derivedState

Derives a complete state object from the base state.
§type

done

Selector that checks if operation is done (success or fail).
§type

failed

Selector that checks if operation failed.
§type

halted

Selector that checks if operation is halted.
§type

inProgress

Selector that checks if operation is in progress.
§type

notStarted

Selector that checks if operation has not started.
§type

paused

Selector that checks if operation is paused.
§type

restarting

Selector that checks if operation is restarting after success.
§type

retrying

Selector that checks if operation is retrying after failure.
§type

successful

Selector that checks if operation completed successfully.