Skip to content

HamidAliSE/react-native-hooks-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

72 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Reusable React Native Hooks

react-native-hooks-collection

npm version npm downloads License TypeScript

A lightweight collection of reusable React Native hooks for faster, cleaner app development.

πŸ“– About

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.

βš™οΈ Installation

You can install the package using either npm:

npm install react-native-hooks-collection

or yarn:

yarn add react-native-hooks-collection

🧩 Available Hooks

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

πŸ–ΌοΈ Example App

Explore the /src/playground folder.

useKeyboard Demo

useKeyboard Demo

useCountdown Demo

useCountdown Demo

useCounter Demo

useCounter Demo

useDebounce Demo

useDebounce Demo

useDebouncedCallback Demo

useDebouncedCallback Demo

useDimensions Demo

useDimensions Demo

useOrientation Demo

useOrientation Demo

usePrevious Demo

usePrevious Demo

useRenderCount Demo

useRenderCount Demo

useStateRef Demo

useStateRef Demo

useThrottledCallback Demo

useThrottledCallback Demo

useToggle Demo

useToggle Demo

πŸ”§ Upcoming Hooks

πŸš€ usePermission (For location & camera)

πŸš€ useCurrentLocation

πŸš€ useStorageState

🀝 Contributing

Contributions, issues, and feature requests are welcome!

🚨 Feel free to check the issues page.

License

This project is licensed under the MIT License – see the LICENSE for more details.

🧠 Author

Hamid Ali

LinkedIn | GitHub

⭐️ Support

If this package helps you, please consider giving it a ⭐️ on GitHub β€” it motivates me to build more!

About

A lightweight collection of reusable React Native hooks for faster, cleaner app development.

Topics

Resources

License

Stars

Watchers

Forks

Contributors