Documentation

hookli is 41 React hooks for the state, DOM, and data chores every app repeats — typed end to end, SSR-safe, and free of dependencies. Every hook on this site runs live on its page, so you can try it before you install it.

Quick start

  1. 1

    Install

    Add hookli to your React app.

    npm i hookli
  2. 2

    Import

    Pull in exactly the hook you need.

    import { useToggle } from "hookli"
  3. 3

    Use it

    Call it in a component — no providers, no config.

Quick example

Import a hook and use it — no providers, no setup.

details.tsxtsx
import { useToggle } from "hookli";

function Details() {
  const [open, toggle] = useToggle(false);

  return (
    <section>
      <button onClick={toggle}>{open ? "Hide" : "Show"} details</button>
      {open && <p>Rendered only while open.</p>}
    </section>
  );
}

Hooks

State

Effects

DOM

Data