hookings v2.8.3
Installation 🚀
You can install hookings
using npm:
npm install hookings
or
yarn add hookings
Features 🌟
- Easy-to-use and well-documented hooks for common React use-cases.
- Highly customizable options to adapt the hooks to your needs.
- A growing collection of useful and versatile hooks.
Available Hooks 🎣
useBoolean
: A hook to manage a boolean state and provide functions to toggle it.useKeyDown
: A hook to capture the event of pressing a specific keyboard key with customizable options for modifier keys.useDebounce
: A hook to create a debounce effect that delays the execution of a function until a certain amount of time has passed without additional calls.useInterval
: A hook to execute a function repeatedly at regular intervals.useDropdown
: A hook to handle the behavior of a dropdown menu and detect clicks outside of the dropdown to close it.useAsync
: A hook to simplify the management of asynchronous operations, handling loading, error, and result states.
Note: More hooks are in development and will be added to the collection soon! 🚧
Usage 📝
useKeyDown
Here's a quick example of how to use the useKeyDown
hook:
import { useKeyDown } from "hookings";
const MyComponent = () => {
// Call this function when the 'Ctrl + Enter' keys are pressed
const handleKeyPress = () => {
// Your logic here...
};
useKeyDown("KeyEnter", handleKeyPress, { ctrlKey: true });
// Rest of your component code...
};
For more detailed examples and usage instructions, please check the documentation.
Contributions 🤝
Contributions to hookings
are always welcome! If you have any ideas for new hooks or improvements to existing ones, feel free to open an issue or submit a pull request on GitHub.
License 📄
Hookings is open-source software licensed under the MIT License.
Conclusion 🎉
Thank you for using Hookings! We hope these custom hooks help improve your React development experience. If you encounter any issues or have any questions, don't hesitate to reach out on Github. Happy coding! 🚀
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago