Skip to content

blocks/async-state

@fungi.computer/caps


@fungi.computer/caps / blocks/async-state

AsyncStateValue = "loading" | "empty" | "error" | "content"

Supported AsyncStateValue values.


AsyncStateProps = Omit<HTMLAttributes<HTMLDivElement>>, "content"> > & object

Props accepted by AsyncState.

state: AsyncStateValue

The host’s explicit state; this block does not infer it from its slots.

loading: ReactNode

empty: ReactNode

error: ReactNode

content: ReactNode

const AsyncState: ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>>, "content"> > & object & RefAttributes<HTMLDivElement>>>>

Selects a caller-rendered state region without fetching or inventing copy.