A collection of useful React hooks.
npm install @scaflo/use-hooks
# or
yarn add @scaflo/use-hooks
# or
pnpm add @scaflo/use-hooks
- useAnimationFrame
- useBattery
- BatteryState
- useBroadcastChannel
- useCookie
- useDebounce
- useIdle
- useGeolocation
- GeolocationCoords
- useEventListener
- useKeyboard
- useLocalStorage
- useOnlineStatus
- useLocationData
- useScrollPosition
- useRetryable
- useThrottle
- useSessionStorage
Import any hook you need from the package:
import { useAnimationFrame, useBattery } from "@scaflo/use-hooks";
Refer to the documentation for detailed usage examples of each hook.