A lightweight collection of reusable React Native hooks for faster, cleaner app development.
react-native-hooks-collection is a growing set of custom React Native hooks that help you write cleaner, more maintainable, and reusable code.
Each hook solves a real-world problem β from handling keyboard visibility and device orientation to managing throttled callbacks and app state changes.
You can install the package using either npm:
npm install react-native-hooks-collection
or yarn:
yarn add react-native-hooks-collection
| Category | Hooks |
|---|---|
| Device | useDeviceOrientation, useDimensions |
| System | useAppState, useInternetStatus, useKeyboard, useBackHandler |
| Utilities | usePrevious, useToggle, useDebounce, useDebouncedCallback, useThrottledCallback |
| Debugging | useRenderCount, useLifecycleLogger, useLogChange |
| Others | useCountdown, useCounter, useIsFirstRender, useStateRef |
Explore the /src/playground folder.
π usePermission (For location & camera)
π useCurrentLocation
π useStorageState
Contributions, issues, and feature requests are welcome!
π¨ Feel free to check the issues page.
This project is licensed under the MIT License β see the LICENSE for more details.
Hamid Ali
If this package helps you, please consider giving it a βοΈ on GitHub β it motivates me to build more!
