use-battery-hook
v1.1.3
Published
A react hook to get battery status
Downloads
9
Maintainers
Readme
use-battery-hook
A react hook to get battery status
Install
npm install --save use-battery-hook
Usage
import React from 'react'
import useBattery from 'use-battery-hook'
const Example = () => {
const { charging, chargingTime, dischargingTime, level } = useBattery();
return (
<MyComponent />
)
}
License
MIT © skyrbe