function ListState
ListState<L extends object>(unnamed 0: ListStateProps<L>): ReactNode

Renders "Loading…" while state loads, its error in an ErrorCard, then empty or children. Those two are only built once loaded, so they can read the loaded fields without checking the status again.

Type Parameters

L extends object

Parameters

unnamed 0: ListStateProps<L>

Return Type

ReactNode

Usage

import { ListState } from "src/components/shared/ListState.tsx";