hooks/useSCFeature
Functions
useSCFeatureEnabled()
useSCFeatureEnabled(
featureName):boolean
Custom hook to check if the feature is enabled
Parameters
| Parameter | Type | Description |
|---|---|---|
featureName | SCFeatureName | feature name |
Returns
boolean
boolean - true if the feature is in the list of features
Ex. const isTaggingEnabled = useSCFeatureEnabled(SCFeatureName.TAGGING);
useSCFeaturesEnabled()
useSCFeaturesEnabled(
featureNames):boolean
Custom hook to check if a list of features are enabled
Parameters
| Parameter | Type | Description |
|---|---|---|
featureNames | SCFeatureName[] | feature names |
Returns
boolean
boolean - true if all features are in the features list
Ex. const hasRequiredFeatures = useSCFeaturesEnabled([ SCFeatureName.TAGGING, SCFeatureName.GROUPING ]);