React hook for subscribing to `online`/`offline` events and the `navigator.onLine` property to see current status
npm install @rehooks/online-status@rehooks/online-status> React hook for subscribing to online/offline events and the navigator.onLine property to see current status
> You'll need to install react, react-dom, etc at ^16.8.4
``sh`
yarn add @rehooks/online-status
`js
import useOnlineStatus from '@rehooks/online-status';
function MyComponent() {
const onlineStatus = useOnlineStatus();
return (