npm.io
1.0.2 • Published 3h ago

@siberiacancode/reactuse

Licence
MIT
Version
1.0.2
Deps
0
Size
2.1 MB
Vulns
0
Weekly
0
React Use logo

React Use

NPM version License Join the community on GitHub

React Use delivers production-ready hooks that solve real-world problems. Built with TypeScript-first approach, SSR compatibility, and tree-shaking optimization - everything you need to build modern React applications. Improve your react applications with our library designed for comfort and speed.

Documentation

Visit https://reactuse.org to view the full documentation.

Getting Started

npm install @siberiacancode/reactuse
import { useCounter } from '@siberiacancode/reactuse';

const App = () => {
  const counter = useCounter(0);

  return (
    <div>
      <h1>Count: {counter.value}</h1>
      <button onClick={() => counter.inc()}>+1</button>
      <button onClick={() => counter.dec()}>-1</button>
    </div>
  );
};

CLI installation

Use the CLI to add hooks to your project with useverse.

npx useverse@latest init
npx useverse@latest add [hook]

You will be presented with a list of hooks to choose from:

Which hooks would you like to add? › Space to select. A to toggle all.
Enter to submit.

â—¯  useActiveElement
â—¯  useAsync
â—¯  useBattery
â—¯  useBluetooth
â—¯  useBoolean
â—¯  useBreakpoints
â—¯  useBrowserLanguage
â—¯  useClickOutside
â—¯  useClipboard
â—¯  useConst

Keywords