Quick Start
@webeach/react-hooks is a set of smart React hooks for performant UIs. Works with React 18+ and is fully SSR-friendly.
Installation
bash
pnpm add @webeach/react-hooksbash
npm install @webeach/react-hooksbash
yarn add @webeach/react-hooksUsage
Import a hook from the root entry:
tsx
import { useBoolean } from '@webeach/react-hooks';
function Example() {
const [isOpen, { toggle }] = useBoolean(false);
return <button onClick={toggle}>{isOpen ? 'Close' : 'Open'}</button>;
}Or import a single hook via its subpath — this loads only that hook's code, which is especially useful for CommonJS consumers:
tsx
import { useBoolean } from '@webeach/react-hooks';Requirements
- React 18+
- Node.js 18+ (for tooling)
Next steps
Browse the full list of hooks in the Hooks section.