useSubWebInfos

useSubWebInfos(
	options?: SubWebsOptions, 
	deps?: any[]): IWebInfosData[] | null | undefined;

Returns web info collection of current webs sub-webs.

Examples

Get all sub sites,

const subSites = useSubWebInfos();

Query sub sites,

const filteredSubSites = useSubWebInfos({
	query: {
		select: ["Title", "Id", "ServerRelativeUrl"],
		filter: "WebTemplate eq 'STS'"
	}
});

Parameters

NameTypeDescriptionTracked for changes
options?SubWebsOptionsuseSubWebs hook optionsPartially
deps?DependencyListHook dependency list.Yes