Repository navigation
Any way to check internet connection #85
Unanswered
vinaygregoryjohn183
asked this question in
Q&A
Replies: 1 comment 1 reply
|
This network logger is just used for displaying network requests that have been made by the app. You'd have to trigger the network request yourself and then verify it in the app. You would then be able to see the request in the network logger if you wanted. e.g. something like this: const onPress = () => {
fetch('/api/test').then((res) => {
setConnected(res.ok);
})
.catch(() => {
setConnected(false)
})
} |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
My use case is to check if the app is connected to the internet on a button press. Is this possible? Someone please help.
All reactions