hi! I'm a new growthbook user and I just started a...
# ask-questions
m
hi! I'm a new growthbook user and I just started a react integration. i followed all the instructions for the react sdk, but i keep getting
false
from
useFeatureIsOn
even after activating my environment and setting the default value to
on
. Anyone know why this might be the case
f
Hi Jie, There can be a few reasons why. To debug, you can use the GrowthBook Chrome DevTools. You should also make sure there is a network request to get the feature flags, and then make sure you’re correctly setting attributes.
m
gotcha, let me try with those suggestions first
The devtools show the right values, but when I call
useFeatureIsOn
the value i get is false:
Copy code
useEffect(() => {
    // Load features asynchronously when the app renders
    growthbook.loadFeatures()
  }, [])

  // TODO: fix growthbook feature flag usage
  // Feature flags
  const clientSidebarFeatureFlag = useFeatureIsOn('dev_portal_client_sidebar')
  console.log('client sidebar feature flag', clientSidebarFeatureFlag)
ah ok i think i might know why
i'm calling the hook in a component that isn't wrapped by the provider