Skip to content

useViewList ​

Overview ​

Extracts all reactive state and wiring for a Django model list view. The caller owns the template; this composable owns route synchronisation, preference persistence, list fetching, action/selection state, and column visibility.

Pass the component's props directly — the composable reads what it needs via reactive property access. options must be reactive (e.g. component props or a reactive({}) object) for prop changes to propagate correctly.

Theme, slot name resolution, useSlots, and emit are all caller responsibilities and are not handled by this composable.

Signature ​

useViewList(options)

Parameters ​

NameTypeRequiredDescription
optionsViewListOptionsyes

Returns ​

ViewListContext

Source ​

client/lib/use/useViewList.js:313