Skip to content

useOnline ​

Hook that manages if the user is online

sensors
test coverage
Last changed: last month

TIP

This hook uses navigator.onLine browser api to provide enhanced functionality. Make sure to check for compatibility with different browsers when using this api

Installation ​

Library
CLI
Manual
typescript
import { useOnline } from '@siberiacancode/reactuse';

Usage ​

typescript
const online = useOnline();

Demo ​

Api ​

Returns

boolean

Source ​

Source • Demo

Contributors ​

D
debabin
debabin
H
hywax
hywax

Released under the MIT License.