Hello, I’m trying to add Growthbook on my react ap...
# ask-questions
w
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
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
each environment can have its own set of override rules to serve the feature.
w
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
can you show a screen shot of your feature override rule?
from growthbook?
f
The source "unknownFeature" usually means the JSON definitions are not being loaded correctly into the SDK
w
f
That setup in GrowthBook looks fine. How are you fetching the features from the API and passing them into the SDK?
w
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.