Hi team,
I have been trying to implement growthbook for feature flagging and can't seem to figure out what I am doing wrong.
I have defined a boolean flag but it keeps returning false
const announcement_flag = useFeatureIsOn("announcement");
announcement is the name of the false and it is toggled on on the dashboard.
I have followed the guide to the letter and still end up with false being returned.
I can also see the features returned in the browser tools
b
billions-xylophone-11752
07/28/2023, 3:04 PM
Hey, Harrison - sorry to hear you're having trouble. Can you confirm you are calling `gb.loadFeatures()`` and that you're setting any attributes via
gb.setAttributes()
?
p
prehistoric-cat-35174
07/28/2023, 3:05 PM
Hi @billions-xylophone-11752
Yes, I am calling gb.loadFeatures().
Not setting any attributes yet, is that required initially?
b
billions-xylophone-11752
07/28/2023, 3:15 PM
@prehistoric-cat-35174 If you're comfortable, would you DM me directly with the code you're using to create a new GrowthBook instance so I can take a look?