Skip to main content

Getting Started

Hookify is a lightweight collection of framework-agnostic React hooks for common, everyday problems: debouncing, API calls, toggling state, syncing state to storage, detecting outside clicks, and more.

Docs versions

These docs come in two versions: the latest release, which matches what npm install gives you, and next, which shows unreleased changes from main. Use the version menu in the top right to switch between them.

Installation​

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

npm install @altalyst/hookify

Hookify ships ESM and CommonJS builds with bundled TypeScript types, and is tree-shakeable, so only the hooks you import end up in your bundle.

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>
);
};

Requirements​

RequirementVersion
React^18.0.0 || ^19.0.0
React DOM^18.0.0 || ^19.0.0
Node (for development)>=24

What's next?​

  • Browse the Hooks section for a live, editable demo and usage guide for each hook.
  • Check the API Reference, generated straight from the library's TypeScript source.