Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const UseBatteryState: React.SFC = (props) => {
const [batteryState] = useBatteryState();
return (
This example only uses the Battery module.
It renders the current battery state, received from the listener.
Battery state
);
};