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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@opensite/hooks

v0.1.1

Published

Performance-first React hooks for UI state, storage, events, and responsive behavior with tree-shakable exports.

Readme

Opensite AI Utility Hooks

OpenSite React Hooks Library

High-performance React hooks for state management, storage, and more.

Overview

The OpenSite React Hooks Library provides a suite of high-performance hooks designed to enhance React applications with efficient state management, storage, and event handling capabilities. This library is part of OpenSite AI's open-source ecosystem, emphasizing modularity, performance, and developer-friendly design. Learn more at OpenSite AI.

Key Features

  • Performance-Optimized Hooks: Built to ensure minimal impact on your application's performance.
  • Modular Design: Use only what you need with tree-shakable exports and hook-level entry points.
  • SEO-Friendly: Designed with best practices to ensure high performance and accessibility.
  • Wide Range of Capabilities: Includes hooks for event handling, storage management, responsive utilities, and more.

Installation

To use the OpenSite React Hooks Library, ensure you have Node.js installed. Then, add the library to your project:

npm install @opensite-ai/react-hooks

Dependencies

  • React and React DOM (version 16.8 or higher)

Available Hooks

| Hook | Description | Documentation | |------|-------------|---------------| | useBoolean | Manage boolean state with convenient helper methods | View Docs | | useCopyToClipboard | Copy text to clipboard with automatic reset and browser compatibility | View Docs | | useDebounceCallback | Debounce callback functions with advanced options | View Docs | | useDebounceValue | Debounce state values with configurable delay | View Docs | | useEventListener | Attach event listeners to DOM elements with automatic cleanup | View Docs | | useHover | Detect hover state on elements using pointer events | View Docs | | useIsClient | Detect if code is running on client-side or server-side | View Docs | | useIsomorphicLayoutEffect | SSR-safe layout effect hook | View Docs | | useLocalStorage | Manage state synchronized with localStorage | View Docs | | useMap | Manage Map state with convenient helper methods | View Docs | | useMediaQuery | Responsive design using CSS media queries | View Docs | | useOnClickOutside | Detect clicks outside of specified elements | View Docs | | usePrevious | Access the previous value of a state or prop | View Docs | | useResizeObserver | Observe element size changes using ResizeObserver API | View Docs | | useSessionStorage | Manage state synchronized with sessionStorage | View Docs | | useThrottle | Throttle value changes with configurable options | View Docs |

Configuration or Advanced Usage

Customize the behavior of useThrottle with various options:

import { useThrottle } from '@opensite-ai/react-hooks';

const throttledValue = useThrottle(value, 300, { leading: true, trailing: false });

Performance Notes

Performance is a core facet of everything we build. The OpenSite React Hooks Library makes use of advanced techniques to optimize rendering and state updates, ensuring that your applications remain fast and responsive.

Contributing

We welcome contributions from the community. For contribution guidelines, visit our GitHub repository.

License

This project is licensed under the BSD 3-Clause License. See the LICENSE file for more details.

Related Projects

Visit OpenSite AI for more projects and information.