npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

hookstack

v0.0.2

Published

A growing collection of practical, production-ready React hooks built for modern React and Node.js, with a focus on simplicity, correctness, and real-world reuse.

Readme

HookStack

A growing collection of practical, production-ready React hooks built with modern React and Node.js in mind.

No magic. No hidden behavior. Just sharp, composable hooks you actually reuse.

⚠️ Active development
hookstack is under constant improvement. New hooks and enhancements are added regularly. APIs aim to be stable, but minor refinements may happen as the library evolves.


Why hookstack?

Most hook libraries fall into one of two traps:

  • too small to be useful
  • too opinionated to be safe

hookstack stays in the middle.

  • Focused, reusable hooks
  • No unnecessary dependencies
  • SSR-safe by default
  • Typed with TypeScript
  • Works with modern React (18+)
  • Built for real-world apps, not demos

If a hook starts behaving like a framework feature, it doesn’t belong here.


Installation

npm install hookstack
# or
pnpm add hookstack
# or
yarn add hookstack

Usage

All hooks are exported from the root package.

import { useToggle, useLocalStorage, useFetch } from 'hookstack';

No deep imports. No internal paths.


Available Hooks

  • useToggle
    Manage boolean state with clear on, off, and toggle helpers.

  • useLocalStorage
    Persist state in localStorage with SSR safety and JSON handling.

  • useCookie
    Read, write, and remove browser cookies with explicit options.

  • useCopyToClipboard
    Copy text to the clipboard with status tracking and safe fallbacks.

  • useFetch
    Perform simple, abort-safe HTTP requests with manual or automatic execution.

Design Principles

  • Primitives first Hooks should do one thing well.

  • No fake abstractions If a hook hides important behavior, it’s wrong.

  • SSR-safe by default Hooks should not crash during server rendering.

  • Escape hatches included Manual control beats clever automation.


Non-goals

hookstack deliberately does not include:

  • useAuth
  • useForm
  • useAxios
  • useQuery replacements
  • App-specific hooks

Those belong in your application, not a shared library.


Roadmap (high level)

Planned and in-progress hooks include:

  • useEvent
  • useInterval
  • useDebouncedValue
  • useMediaQuery
  • useClickOutside
  • usePrevious
  • useDisclosure

The library is actively evolving, with careful API additions over time.


Contributing

Contributions are welcome, but discipline matters.

  • Hooks must be reusable
  • No app-specific assumptions
  • Simplicity over cleverness

Open an issue before large changes.


License

MIT © Gautam Suthar