Supercharge your React Workflow

A collection of beautiful, robust, and dependency-free React hooks. Stop copying and pasting the same utility functions across projects. Get instant access to a battle-tested library of essential hooks.

Installation

Install the library in your project via your favorite package manager:

npmnpm install @danixsoft/hooks
yarnyarn add @danixsoft/hooks
pnpmpnpm add @danixsoft/hooks

Key Features

đŸŒŗ

Tree-shakeable

Import only what you need. Your final bundle size will remain microscopic.

đŸ›Ąī¸

TypeScript First

Written entirely in TypeScript. Enjoy full autocomplete and type safety out of the box.

đŸĒļ

Zero Dependencies

We don't rely on any third-party libraries. Built entirely on React primitives.

🚀

SSR Compatible

Works flawlessly with Next.js and Remix Server-Side Rendering.

Quick Usage

Every hook is exported from the main package. Simply import them by name.

Usage Example
1import { useToggle, useLocalStorage } from '@danixsoft/hooks';
2
3function App() {
4  const [isOpen, toggle] = useToggle(false);
5  const [theme, setTheme] = useLocalStorage('theme', 'dark');
6
7  return (
8    <div>
9      <button onClick={toggle}>
10        {isOpen ? 'Close' : 'Open'}
11      </button>
12    </div>
13  );
14}