preview.mov
This is An Example of Using JS With react to check on Internet Connection
No Need For Any Packages Only Usage of JS navigator.onLine
Option
The example Just Use a simple Bar to Show Off the Connection Detection
But you can use More With The provided Logic & Apply it In Ay Way
You Only need To test this Component to :
npm install
To install Needed Packages
npm run dev
To Run the App on localhost
on Chrome For testing Toggle the Network Status From Offline
to Online
to see The Effect
Happy Coding 😁 🚀