react-super-hooks
TypeScript icon, indicating that this package has built-in type declarations

1.5.1 • Public • Published

⚓ React Super Hooks ⚓

This npm package includes a range of custom hooks for React, created to make project development easier and more efficient.

🛠️ Installation guide

npm i react-super-hooks

✅ Available Hooks

  • useFetch: Manages data fetching within components
  • usePrevious: Tracks the previous value of a state
  • useToggle: Handles boolean state toggling in components
  • useForm: Simplifies form state management
  • useHover: Detects whether an element is being hovered over
  • useUpdateEffect: Executes an effect only after the first render
  • useOnClickOutside: Detects clicks that occur outside a specified element
  • useDebounce: Delays the update of a value until after a specified delay
  • useScript: Dynamically loads and manages external scripts
  • useLocalStorage & useSessionStorage: Facilitates interaction with browser storage mechanisms such as localStorage and sessionStorage
  • useWindowSize: Tracks the dimensions of the browser window

✨ Features

  • TypeScript Support: Comprehensive TypeScript support ensures type safety and enhances the development experience.
  • Lightweight: Minimal footprint to ensure application remains fast and efficient.
  • Easy Integration: Simple and intuitive API for quick integration into your existing projects.
  • SSR Compatibility: Compatible with server-side rendering (SSR) for seamless integration into server-rendered applications.
  • ESLint and Prettier Integration: Built-in support for ESLint and Prettier to maintain code quality and consistency.
  • Well-Written Documentation: Detailed documentation to simplify usage and implementation.

🚀 Usage

To use these custom hooks, import them by name from the library. Here is a quick example of how to use this package in your project:

import { useFetch, usePrevious, useToggle } from "react-super-hooks";

💻 Demo

Check out the live demo here: CodeSandbox

Check out the repository for the demo here: Github

📄 Documentation

For documentation, examples and other details please refer Documentation

🌐 License

This project is open-source and licensed under the MIT License.

🤝 Contributions

We encourage your contributions! If you have suggestions, enhancements, or bug fixes, please open an issue or submit a pull request.

✍🏻 Creator

Ishan Trivedi

Package Sidebar

Install

npm i react-super-hooks

Weekly Downloads

5

Version

1.5.1

License

MIT

Unpacked Size

12.3 kB

Total Files

16

Last publish

Collaborators

  • ishantrivedi25