Skip to content

A react hook (useOnline) for checking User connected to Internet or not return boolean value

Notifications You must be signed in to change notification settings

Deepaktenzi/useOnline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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>
        </>
        );
    }
}

About

A react hook (useOnline) for checking User connected to Internet or not return boolean value

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published