Skip to content

A react hook for watching device connectivity status

Notifications You must be signed in to change notification settings

utenma/useOnline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A react hook for watching device connectivity status

Install

npm i @saulpalv/useonline

//or

yarn add @saulpalv/useonline

Usage

import type { FC } from 'react';
import { useOnline } from '@saulpalv/useonline';

export const DialogNetwork: FC = ()=> {

    const isOnline = useOnline();

    return (
        <Dialog show={!isOnline}>
            You are not online
        </Dialog >
    );
});

About

A react hook for watching device connectivity status

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published