Repository avatar
Other Tools
v0.1.0
active

hookify

io.github.altalyst-solutions/hookify

Accurate, version-matched docs and hook recommendations for the @altalyst/hookify React hooks.

Documentation

Hookify logo

Hookify

A collection of framework-agnostic React hooks that just work.

npm version npm downloads bundle size PR Check status TypeScript PRs welcome MIT license

Documentation ยท Hook demos ยท API reference ยท Discussions


Hookify is a lightweight, dependency-free collection of React hooks for everyday problems: debouncing, data fetching, toggling state, syncing state to storage, detecting outside clicks, and more. Every hook is written in TypeScript, fully typed, tree-shakeable, and documented with a live, editable demo.

Features

  • ๐ŸŒ SSR-safe โ€” hooks never touch window, document or navigator during render, so they work with Next.js, Remix and other server renderers without hydration warnings.
  • ๐Ÿงน Safe by default โ€” timers, listeners and observers are cleaned up on unmount and when inputs change, and hooks behave correctly under StrictMode.
  • ๐Ÿ” No stale closures โ€” callbacks and options can change between renders without resubscribing or resetting state.
  • ๐Ÿ“ฆ Tiny and tree-shakeable โ€” import only what you use; no runtime dependencies beyond React. Ships ESM and CommonJS builds.
  • ๐Ÿ”’ Fully typed โ€” written in TypeScript with generated .d.ts files included.
  • โšก Zero config โ€” works with any React 18 or 19 project (CRA, Vite, Next.js, Remix, etc.).

Installation

Hookify has react and react-dom as peer dependencies (v18+).

npm install @altalyst/hookify
yarn add @altalyst/hookify
pnpm add @altalyst/hookify

Quick start

Import any hook directly from the package root:

import { useToggleState } from "@altalyst/hookify";

export const Example = () => {
  const [isVisible, toggleVisibility] = useToggleState(false);

  return (
    <div>
      <button onClick={toggleVisibility}>
        {isVisible ? "Hide" : "Show"} content
      </button>
      {isVisible && <p>This is some toggleable content!</p>}
    </div>
  );
};

Documentation

Hookify covers state, timing, async data, DOM observers, browser APIs, and multi-tab coordination. The hooks documentation lists every hook, with a live, editable demo and the full API of each one. Guides and the generated API reference live in the docs site.

These docs match the latest release on npm. To see hooks and changes that are on main but not yet released, browse the unreleased docs; the version menu in the top right switches between the two.

useDebounce and useThrottle are deprecated aliases of useDebouncedCallback and useThrottledValue, kept for compatibility and due to be removed in a future release.

Using hookify with AI agents

@altalyst/hookify-mcp is an MCP server that gives AI coding agents such as Claude Code, Cursor and VS Code accurate, version-matched docs for every hook, so they use the real API instead of guessing it. It runs locally and makes no network requests:

claude mcp add hookify -- npx -y @altalyst/hookify-mcp

Setup for other clients, and what the server offers, is in its README.

Contributing

Contributions, issues, and feature requests are welcome! See CONTRIBUTING.md for local setup, running tests and the docs site, how to add a new hook, and our commit/versioning conventions. Please also read our Code of Conduct. See CHANGELOG.md for release history.

Community

  • ๐Ÿ’ฌ GitHub Discussions โ€” ask questions, share ideas.
  • ๐Ÿ› Issues โ€” report bugs or request features.
  • ๐Ÿ”’ Security policy โ€” how to report a vulnerability.
  • ๐Ÿ“ฆ npm โ€” package page and version history.

License

MIT ยฉ Altalyst Solutions. See LICENSE for details.


Built with โค๏ธ by Altalyst Solutions
NPM
@altalyst/hookify-mcp
Install Command
npm install @altalyst/hookify-mcp