Skip to content

Xenos112/use-reacty

Repository files navigation

use-reacty

use-reacty logo

A collection of useful, type-safe, and stateful React hooks

Minimal · TypeScript-first · Stateful · SSR-friendly


⚠️ Project is under active development! Expect breaking changes and new features.


🚀 Installation

# npm
npm install use-reacty

# pnpm
pnpm add use-reacty

# bun
bun add use-reacty

# yarn
yarn add use-reacty

✨ Features

  • 🪶 Minimal: Only uses React and web standard features
  • ⚛️ Follows the React Standard: No magic, just hooks
  • 🟦 Type-safe: TypeScript support out of the box for all hooks
  • 🌀 Stateful: All hooks are stateful
  • 🧩 SSR-friendly: Works with SSR and SSG (limited support, see below)
  • 📚 Well-documented: Each hook comes with its own docs and demo

🛠 Usage Example

import { useIdle, useSupported, useTitle } from "use-reacty";

const { isIdle } = useIdle();
const [title, setTitle] = useTitle();
const isSupported = useSupported(() => navigator && "getBattery" in navigator);

📖 Documentation

⚠️ Caveats

Warning

Current version has limited support for SSG and SSR. Please report any issues or incompatibilities.

🗺️ Roadmap

  • 50+ hooks
  • 100% test coverage
  • SSR compatibility
  • Per-hook documentation & demos
  • Extensibility for custom hooks

Made with ❤️ by Xenos

About

a collection of reusable react hooks. made to make your life easier

Resources

Stars

Watchers

Forks

Packages

No packages published