Open justinadkins opened 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
any update regarding this issue? or any workaround? i am having an issue where if i have added some alerts to check if internet is working or not. so when i launch the app with internet on… i get the alert that internet connected (working as intended) when i turn off internet … gets the alert “you are offline” (working as intended)
but if i turn on internet again….nothing happens at all. after turning off internet once… it doesn’t update anymore.
Hi! same issue here. We should be able to control the initial value of the hook, otherwise it is forcing us to add another function to determine what value "null" should be.
I have just realized that it returns null only first time it is called. So if in your initial screen you just wait until the value is different than null then all is ok :)
Is there any way to change the "definition" of isConnected? I want it to be more similar to netInfo's where it doesn't necessarily need internet access, so i can avoid pinging entirely.
Current Behavior
useIsConnected
will return null prior to the first "check". This breaks a lot of assumptions that I had from 5.X since it defaulted to true previously.false
Expected Behavior
I expect the typing foruseIsConnected
to reflect what it will returnHow to reproduce
Your Environment