- Used React
- React SDK
In LaunchDarkly I created a boolean feature flag called coolFlag
The React SDK was initialized in App.js
using the withLDProvider
function.
A JS file feature.Flag.js
was created which contains the feature flag code and FeatureFlag
is declared. Additionally, the logic for the feature flag coolFlag
is provided.
When feature flag is off, users see: Feature Flag off...
When feature flag is on, users see: Feature Flag ON!!! Yah!!!!!