I want to check if internet is available when calling an api in the app
if(navigator.onLine) // returns true
First we should check internet connection is true or not.Then next line call Api in the same function.But this is true or not. I don’t know. Please try it
How we check internet connection is true or false?