-
Type:
Task
-
Status: Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Master
-
Component/s: JS APIs and Utilities
-
Labels:
-
Story Points:1
-
Sprint:S05E05 - Tetris
The useFeatureFlag hook is limited in that it can only be using in React applications. In order to enforce consistency of feature flags across DXP in javascript code, it is better that each feature flag is referenced off of the global Liferay object directly. This both reduces the LOC and the complexity of needing an additional hook.
Old:
import {useFeatureFlag} from 'data-engine-js-components-web'; //... const flags = useFeatureFlag(); //... if (flag['LPS-xxxx']) {
New:
if (Liferay.FeatureFlags['LPS-xxxx']) {