Genesis
@beta

useViewList

A view's list, headless: the same scope, filters and permissions as `<ResourceView>`, one page at a time, for a screen that draws the rows itself (a custom view, ADR 0019): ```tsx const list = useViewList(playersView, { perPage: 10, sort: { field: "points", order: "desc" } }); if (list.loading) return null; // <CustomView> draws loading, empty and error for you return list.rows.map((p) => <Row key={list.keyOf(p)} player={p} />); ``` Reads go under core's list keys, so a save to the resource refreshes it; `live` refetches on a provider's change, as a list's does.

packages/ui/src/components/data/resource-view/use-view-list.ts

Import
Subpath export: @marktiderman/genesis-ui/data
import { useViewList } from "@marktiderman/genesis-ui/data";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

useViewPermissions

The view's guards for the viewer, narrowed by a screen's own rule. Shared by every view type and custom view, so they can't disagree.

No declared props.

useViewList

A view's list, headless: the same scope, filters and permissions as `<ResourceView>`, one page at a time, for a screen that draws the rows itself (a custom view, ADR 0019): ```tsx const list = useViewList(playersView, { perPage: 10, sort: { field: "points", order: "desc" } }); if (list.loading) return null; // <CustomView> draws loading, empty and error for you return list.rows.map((p) => <Row key={list.keyOf(p)} player={p} />); ``` Reads go under core's list keys, so a save to the resource refreshes it; `live` refetches on a provider's change, as a list's does.

No declared props.

VIEW_LIST_PAGE

Rows per page a view list asks for by default.

No declared props.