useBattery— get the battery level, state and power modeuseBatteryLevel— get or track the battery level or percentage remaininguseBatteryLowPowerMode— get or track the battery low power modeuseBatteryState— get or track the battery (charging) state
useBrightness— change or track the screen brightnessuseSystemBrightness— change or track the system screen brightnessuseSystemBrightnessMode— change or track the system brightness mode
useFonts— load a map of fonts
usePermissions— get or ask permissions
useScreenOrientation— track changes in screen orientationuseScreenOrientationLock— lock the screen to an orientation
useAccelerometer— track changes in accelerationuseBarometer— track changes in air pressureuseDeviceMotion— track device motion and orientationuseGyroscope— track changes in rotationuseMagnetometer— track changes in the magnetic fielduseMagnetometerUncalibrated— track changes in the magnetic field using raw datausePedometer— track user step countusePedometerHistory— get historical step count between two dates
You can import these hooks with two methods, install use-expo or @use-expo/<group> package.
import { useBrightness, usePermissions } from 'use-expo';
// or
import { useBrightness } from '@use-expo/brightness';
import { usePermissions } from '@use-expo/permissions';
use-expoincludes all hooks and, because of that, requires all peer dependencies. It's recommended only to install the hooks you use to avoid unnecessary peer dependency warnings.
with ❤️ byCedric