https://www.growthbook.io/ logo
w

witty-pillow-79680

05/17/2022, 9:53 PM
Hello, I’m trying to add Growthbook on my react app for the first time. Is it possible to control the feature flags for a non-production environment? I noticed that on the GrowthBook portal, there is only a toggle for the
production
env. Is pointing my local env to a production build the only way I can test out the feature flags locally? Or could I add something to the portal to allow GrowthBook to manipulate the flags for any non-prod environment? Any insights will be appreciated. Thank you.
f

future-teacher-7046

05/17/2022, 9:54 PM
Hi Karen, under Settings you can add new environments
We also have a Chrome devtools extension that lets change feature values locally for development and QA
f

fresh-football-47124

05/17/2022, 9:57 PM
each environment can have its own set of override rules to serve the feature.
w

witty-pillow-79680

05/17/2022, 10:04 PM
Thank you - I just added the
development
env and it seems like that was not the root cause of my issue. When I logged
useFeature('feature-test)
, I’m seeing the following. I’m expecting
on
to be true when the feature flag is on, but that’s not the case. Any pointers on what I might be missing?
f

fresh-football-47124

05/17/2022, 10:05 PM
can you show a screen shot of your feature override rule?
from growthbook?
f

future-teacher-7046

05/17/2022, 10:06 PM
The source "unknownFeature" usually means the JSON definitions are not being loaded correctly into the SDK
w

witty-pillow-79680

05/17/2022, 10:07 PM
f

future-teacher-7046

05/17/2022, 10:09 PM
That setup in GrowthBook looks fine. How are you fetching the features from the API and passing them into the SDK?
w

witty-pillow-79680

05/17/2022, 10:11 PM
Your wording has helped me understand better what the
unknownFeature
mean. I think I made a mistake on the configuration part. I’m going to look into that first and see if I can fix it. If not, I’ll come back here. Thank you so much.