New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-hookstack

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hookstack

A collection of powerful and reusable React hooks.

Source
npmnpm
Version
1.0.6
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

⚡ React Hookstack

build license issues typescript react Coverage

A lightweight and powerful collection of reusable React hooks designed to simplify state management, event handling, and UI logic in your React apps.

🚀 Features

  • 🧠 Smart utilities — abstract common React logic into reusable hooks
  • 🪶 Lightweight — zero external dependencies
  • ⚙️ TypeScript support — fully typed API
  • 🧩 Composable — integrate easily into existing code
  • 🔧 Framework agnostic — works with any React setup (Vite, CRA, Next.js, etc.)

📘 Storybook

Explore all hooks interactively on Storybook:
👉 Live Demo

📦 Installation

Once published to npm:

npm install react-handyhooks
# or
yarn add react-handyhooks

If you’re developing locally and want to test it

# Inside react-handyhooks/
npm link

# In your target React project:
npm link react-handyhooks

🧠 Available Hooks

Hook NameDescription
useArrayManage array state easily
useAsyncHandle async operations
useBooleanManage boolean state
useClickOutsideDetect clicks outside element
useCopyToClipboardCopy text to clipboard
useCounterSimple counter hook
useDarkModeDetect dark mode preference
useDebounceDebounce changing values
useDeviceOrientationTrack device orientation
useEventListenerAttach event listener safely
useFocusManage element focus
useFormStateManage form state
useHoverTrack hover state
useInputManage input value
useIntervalSet up recurring interval
useLocalStorageSync state with localStorage
useMapManage Map state
useMediaQueryListen to CSS media query
useOnlineStatusDetect online/offline status
usePreviousGet previous value
useRafStateState synced with requestAnimationFrame
useSessionStorageSync state with sessionStorage
useThrottleThrottle changing values
useTimeoutExecute callback after delay
useToggleToggle boolean state
useUpdateEffectRun effect except first render
useWindowSizeTrack window size

🧩 Example Usage

import React from "react";
import { useToggle } from "react-handyhooks";

export const Example = () => {
  const [isOpen, toggle] = useToggle(false);

  return (
    <div>
      <button onClick={toggle}>
        {isOpen ? "Hide" : "Show"} Details
      </button>

      {isOpen && <p>Here are the details...</p>}
    </div>
  );
};

Development

git clone https://github.com/Shakir-Afridi/react-handyhooks.git
cd react-handyhooks
npm install

Start development mode

npm run dev

Build for production

npm run build

To test it in another project locally

npm link
# then in your test project:
npm link react-handyhooks

🧾 License

This project is licensed under the MIT License.

💡 Contributing

Contributions are welcome! If you’d like to add new hooks or fix bugs, please open an issue or submit a pull request.

# Fork & clone
git clone https://github.com/Shakir-Afridi/react-handyhooks.git

# Create a feature branch
git checkout -b feature/my-new-hook

# Commit changes
git commit -m "feat: add useXYZ hook"

# Push & open PR
git push origin feature/my-new-hook

👨‍💻 Author

React Hookstack — maintained by passionate open-source developers who believe in clean, reusable React logic

⭐ Support

If you find this library useful, please give it a star ⭐ on GitHub — it helps others discover and support the project!

FAQs

Package last updated on 21 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts