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:
npm
npm install @danixsoft/hooksyarn
yarn add @danixsoft/hookspnpm
pnpm add @danixsoft/hooksKey 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}