useView

useView(
	listId: string,
	viewId?: string,
	options?: ViewOptions, 
	deps?: any[]): IViewInfo | null | undefined;

Returns a list view.

Parameters

NameTypeDescriptionTracked for changes
listId?stringList UUID or titleYes
viewId?stringView UUID or titleYes
options?ViewOptionsuseView hook optionsPartially
deps?DependencyListHook dependency list.Yes

Examples

Get default list view,

const defaultView = useView("My List Title");

Get list view by name,

const myView = useView("My List Title", "My View");

Get list view by UUID,

const myView = useView("My List Title", "9db07c1f-7880-4601-99d0-1c39c43f6599");

Query default list view properties,

const defaultViewInfo = useView("My List", undefined, {
	query: {
		select: ["Id"]
	}
});