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

@incloodsolutions/react-toolkit

v0.0.4

Published

A collection of reusable React utilities, hooks, and components designed to accelerate development and improve code consistency across React applications.

Readme

@incloodsolutions/react-toolkit

npm version npm downloads license

A thin React layer over @incloodsolutions/toolkit: a few purpose-built hooks and utilities, react-hook-form resolver helpers, and convenient re-exports of the full usehooks-ts API plus a large slice of react-use.

For a one-line index of every export in this package (and the other toolkits), see ../docs/AI-INDEX.md. Every exported hook, utility, and type also carries an inline TSDoc comment with parameter descriptions, default values, and examples.


Installation

npm install @incloodsolutions/react-toolkit

Peer dependencies: react, react-dom, react-router-dom. Bundled: clsx, tailwind-merge, react-hook-form, @hookform/resolvers, joi, zod, usehooks-ts, react-use.

Own API

Hooks

useKeyEvent

Run an action when a key or key-combination is pressed.

import { useKeyEvent } from '@incloodsolutions/react-toolkit';

useKeyEvent({
  combinations: { keys: ['Control', 's'], matchAll: true },
  eventType: 'keydown',
  returnedAction: () => save(),
});

usePageMetadata

Set the document title, description, Open Graph / Twitter card meta tags, and an optional document.body background. Everything is reverted on unmount.

usePageMetadata({
  title: 'Dashboard',
  description: 'Your account overview',
  ogImage: '/og.png',
  twitterCardType: 'summary_large_image',
});

useCustomNavigation

A React Router wrapper that returns a single metadata object and a query-aware navigate.

const nav = useCustomNavigation((info) => console.log('route changed', info.path), false);

nav.navigate('/users', { queries: { page: 2, tags: ['a', 'b'] }, replace: true });
// nav.path, nav.query, nav.params, nav.hash, nav.url, nav.fullUrl,
// nav.state, nav.data (loader), nav.matchedData, nav.navigationType

onRouteChange fires only on real route changes (it diffs a function-stripped snapshot).

Utilities

import { parseClassnames, getScreenSize } from '@incloodsolutions/react-toolkit';

parseClassnames('px-2 py-1', condition && 'bg-red-500', { hidden: !open });
// clsx + tailwind-merge: later Tailwind classes win

getScreenSize(); // 'mobile' (<768) | 'tablet' (<1024) | 'desktop'

react-hook-form resolver helpers

import { zodCustomResolver, joiCustomResolver, classValidatorCustomResolver } from '@incloodsolutions/react-toolkit';
import { useForm } from 'react-hook-form';

const form = useForm({ resolver: zodCustomResolver(MySchema, {}) });

Re-exported hook libraries

import ... from '@incloodsolutions/react-toolkit' also gives you:

  • All of usehooks-ts — useDebounceValue, useLocalStorage, useMediaQuery, useOnClickOutside, useEventListener, useIntersectionObserver, useCopyToClipboard, and the rest.
  • Much of react-use — useAsync, useAsyncFn, useDebounce, useThrottle, useGeolocation, useBattery, useNetworkState, useMedia, useMeasure, useClickAway, useFullscreen, useIdle, usePrevious, createBreakpoint, createGlobalState, and more.

Where names collide with usehooks-ts, the react-use version is exported with a 2 suffix: useBoolean2, useCounter2, useHover2, useInterval2, useCopyToClipboard2.

Known limitations in the current release

  • useCustomReactHookForm is not exported — it exists in src/hooks/useHookForm.ts but is not re-exported by src/hooks/index.ts.
  • getViteConfiguration (in src/config) and the emoji dataset (in src/constant) are commented out and export nothing.

Development

npm install
npm run build    # tsup: bundles ESM + a single dist/index.d.ts
npm run format   # prettier --write over src/**/*.{ts,tsx} (tabs, single quotes)
npm run lint     # eslint --fix
npm test         # jest
npm run package  # build, then npm pack a tarball

The build has a single src/index.ts entry: dist/ contains just index.js (ESM) and a bundled index.d.ts, matching the other packages. Deep imports (.../dist/hooks/...) are no longer emitted — everything is reachable from the package root.

License

MIT © Inclood Solutions