-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using useFlags
outside of the LDProvider
context does not raise an error
#214
Comments
Thank you for reporting this. We will investigate and provide an update soon. Internally logged as 213181. |
Thanks @yusinto! |
We could try catch the react error try {
const flags = useFlags();
} catch(e) {
console.log(`Provider not setup: ${e}`)
} |
This issue is marked as stale because it has been open for 30 days without activity. Remove the stale label or comment, or this will be closed in 7 days. |
Hi, is this issue still opened to work upon or is it closed? Thanks. |
Take the following example code (highly simplified):
The call to
useFlags
occurs outside of theLDProvider
context, thus resulting in an empty flags object{}
. However, this does not raise some warning/error in the console, which would be helpful for catching this in less obvious cases.The text was updated successfully, but these errors were encountered: