useOnline

Tags:

A React Hook that tracks online status.

Demo

Source
Is online:
true

Usage

See API for more details.

Source

Click links below to view source on GitHub.

API

const isOnline = useOnline()

Returns

A boolean value that indicates whether the user is online or not.