
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
react-hookstack
Advanced tools
A lightweight and powerful collection of reusable React hooks designed to simplify state management, event handling, and UI logic in your React apps.
Explore all hooks interactively on Storybook:
👉 Live Demo
Once published to npm:
npm install react-handyhooks
# or
yarn add react-handyhooks
# Inside react-handyhooks/
npm link
# In your target React project:
npm link react-handyhooks
| Hook Name | Description |
|---|---|
| useArray | Manage array state easily |
| useAsync | Handle async operations |
| useBoolean | Manage boolean state |
| useClickOutside | Detect clicks outside element |
| useCopyToClipboard | Copy text to clipboard |
| useCounter | Simple counter hook |
| useDarkMode | Detect dark mode preference |
| useDebounce | Debounce changing values |
| useDeviceOrientation | Track device orientation |
| useEventListener | Attach event listener safely |
| useFocus | Manage element focus |
| useFormState | Manage form state |
| useHover | Track hover state |
| useInput | Manage input value |
| useInterval | Set up recurring interval |
| useLocalStorage | Sync state with localStorage |
| useMap | Manage Map state |
| useMediaQuery | Listen to CSS media query |
| useOnlineStatus | Detect online/offline status |
| usePrevious | Get previous value |
| useRafState | State synced with requestAnimationFrame |
| useSessionStorage | Sync state with sessionStorage |
| useThrottle | Throttle changing values |
| useTimeout | Execute callback after delay |
| useToggle | Toggle boolean state |
| useUpdateEffect | Run effect except first render |
| useWindowSize | Track window size |
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>
);
};
git clone https://github.com/Shakir-Afridi/react-handyhooks.git
cd react-handyhooks
npm install
npm run dev
npm run build
npm link
# then in your test project:
npm link react-handyhooks
This project is licensed under the MIT License.
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
React Hookstack — maintained by passionate open-source developers who believe in clean, reusable React logic
If you find this library useful, please give it a star ⭐ on GitHub — it helps others discover and support the project!
FAQs
A collection of powerful and reusable React hooks.
The npm package react-hookstack receives a total of 2 weekly downloads. As such, react-hookstack popularity was classified as not popular.
We found that react-hookstack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.