Open davidli3100 opened 10 months ago
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 dispatcher is null
but we follow the react's team design to let the application do this. You can easily wrap a try catch in your application this way if you choose to:
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.