Skip to content

useBattery ​

Category
Browser

Hook for getting information about battery status

typescript
import { useBattery } from '@siberiacancode/reactuse';

Usage ​

typescript
const { supported, loading, charging, chargingTime, dischargingTime, level } = useBattery();

Demo ​

Api ​

Contributors ​

Source • Demo