Useful Javascript function
This is the javascript function that allow you to check if the internet connection is available or not. Simply call this function will return true or false. navigator.onLine
This is the javascript function that allow you to check if the internet connection is available or not. Simply call this function will return true or false. navigator.onLine
In state component we can use the following idiom In react hooks, we do similar like below.