useOnline ​
sensors
test coverage
Last changed: 28 days ago
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
Hook that manages if the user is online
typescript
import { useOnline } from '@siberiacancode/reactuse';
Usage ​
typescript
const online = useOnline();
Demo ​
Api ​
Returns
boolean