use-expo icon indicating copy to clipboard operation
use-expo copied to clipboard

Complementary hooks for Expo

expo hooks

Complementary hooks for Expo

contributors builds demo

Usage   —   Changelog


Application

  • useApplicationInstallTime  —  get the time the app was installed on the device
  • useApplicationAndroidInstallReferrer  —  get the referrer URL of the installed app
  • useApplicationAndroidLastUpdateTime  —  get the time the app was last updated via the Google Play Store
  • useApplicationIosIdForVendor  —  get the referrer URL of the installed app

Battery

  • useBattery  —  get the battery level, state and power mode
  • useBatteryLevel  —  get or track the battery level or percentage remaining
  • useBatteryLowPowerMode  —  get or track the battery low power mode
  • useBatteryState  —  get or track the battery (charging) state

Brightness

  • useBrightness  —  change or track the screen brightness
  • useSystemBrightness  —  change or track the system screen brightness
  • useSystemBrightnessMode  —  change or track the system brightness mode

Font

  • useFonts  —  load a map of fonts

Permissions

  • usePermissions  —  get or ask permissions

Screen Orientation

  • useScreenOrientation  —  track changes in screen orientation
  • useScreenOrientationLock  —  lock the screen to an orientation
  • useScreenOrientationPlatformLock  —  lock multiple platforms to an orientation

Sensors

  • useAccelerometer  —  track changes in acceleration
  • useBarometer  —  track changes in air pressure
  • useDeviceMotion  —  track device motion and orientation
  • useGyroscope  —  track changes in rotation
  • useMagnetometer  —  track changes in the magnetic field
  • useMagnetometerUncalibrated  —  track changes in the magnetic field using raw data
  • usePedometer  —  track user step count
  • usePedometerHistory  —  get historical step count between two dates

Store Review

  • useStoreReviewHasAction  —  determines if the store review can perform any action
  • useStoreReviewIsAvailable  —  determines if the platform has the capabilities to use request review
  • useStoreReviewRequest  —  request a store review if available

WebBrowser

  • useBrowsers  —  Get a list of Android browsers
  • useWarmBrowser  —  Warm up and cool down and android browser

Usage

You can import these hooks by installing the @use-expo/<group> packages.

import { useBrightness } from '@use-expo/brightness';
import { usePermissions } from '@use-expo/permissions';

Contributors

This project follows the all-contributors specification (emoji key). Contributions of any kind welcome!


Cedric van Putten

💻 📖 💡

Evan Bacon

💻 📖

Robbie op de Weegh

💻 📖

Jakub Biesiada

🐛 💻

with :heart: byCedric