useApps

useApps<T>(options?: WebAppsOptions, deps?: any[]): T[] | null | undefined;

Returns app collection from app catalog.

Examples

Get apps from site collections app catalog,

const apps = useApps();

Get apps from tenants app catalog,

const apps = useApps({
  scope: "tenant"
});

Set scope to site collection explicitly,

const apps = useApps({
  scope: "sitecollection"
});

Query apps from app catalog,

const filteredApps = useApps({ 
  query: { 
    select: ["Title", "Id", "IsEnabled"],
    filter: "IsEnabled eq true" 
  }
});

Parameters

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