79207042

Date: 2024-11-20 11:46:28
Score: 0.5
Natty:
Report link

I am late to the party, but I found a better solution to this issue.

If you aim to check if the user is offline, you can do that by using navigator.onLine on the catch.

.catch((error) => {
        if(!navigator.onLine) {
          handleOffline()
        }
      })
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Yassir Hartani