Askr documentation
Generated API snapshot

@askrjs/askr/foundations/state

Exports from the declarations published in @askrjs/askr. Signatures reflect the published artifact.

Exports

This entrypoint publishes 2 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

controllableStatetype

controllableState: <T>(options: { value: T | undefined; defaultValue: T; onChange?: (next: T) => void; }) => ControllableState<T>

controllableState Hook-like primitive that mirrors state() semantics while supporting controlled/uncontrolled behavior.

ControllableStatetype

ControllableState: StateTuple<T> & {
  isControlled: boolean;
}

A {@link StateTuple} accessor that also reports whether it is controlled.