useFeatures

useFeatures(
	options?: FeaturesOptions,
	deps?: any[]): IFeatureInfo[] | null | undefined;

Returns site or web feature collection. Scope type can be defined in FeaturesOptions.scope property.

Examples

Get web features,

const webFeatures = useFeatures();

Get site features,

const siteFeatures = useFeatures({
	scope: "site"
});

Parameters

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