1.0.1 • Published 1 year ago
reactjs-hooks v1.0.1
A react hook for watching device connectivity status
Install
npm i reactjs-hooks
//or
yarn add reactjs-hooks
Usage
import { useOnline } from 'reactjs-hooks';
const ComponentName = ()=>{
const isOnline = useOnline();
if (!isOnline) {
return (
<>
<h1>You Are Offline, Check Internet Connection </h1>
</>
);
}
}