This message was deleted.
# announcements
w
This message was deleted.
f
Is it possible that you’re calling useFeature before the setFeatures finishes?
you can add a debug log after setting features to make sure that’s working
might be a race condition
c
yeah, I just test it and that's the issue.
so the solution here would be wrapping the inner component with FeaturesReady ?
f
you can also use a useEffect hook for the useFeature which will update once the features load
b
the growthbook instance also has a boolean property
ready
you can check.
<FeaturesReady />
is essentially checking that but also has timeout functionality. note that
ready
will be truthy if either experiments or features are provided to the SDK context and does not require both.
c
Thank you both for the help 🙏
504 Views