Locally changing the value of a feature gate - RedHatInsights/uhc-portal GitHub Wiki

With the merging of #125, all feature gate values will be fetched and managed by React Query. For most development, the change will be transparent. The useFeatureGate hook will be unchanged - it is called the same way, and it will return the same value.

Feature gate constants

The largest noticeable change is the location of the feature gate constants. The feature gate constants are now located at src/queries/featureGates/featureConstants.ts. For the feature gate to be prefetched when the application loads, ensure that the feature gate is defined above and is added to the default export object.

Temporarily changing value of a feature gate locally

Because feature gate information is now stored in React Query, the React Query tools can be used to change the feature gate value.

  1. Open the React Query dev tools
  2. Click on the feature gate you want to change. the exact one may be easier to find if you filter by "featureGate"
  3. In the Data explorer, expand the "Data" section
  4. Click the enabled checkbox to turn the feature gate on/off

image