What is ReactUse?

ReactUse (@reactuses/core) is an open-source library of 110+ custom React Hooks for building production applications. It provides TypeScript-first, tree-shakable, and SSR-compatible hooks covering browser APIs, state management, DOM observation, side effects, and third-party integrations. ReactUse supports React 16.8 through React 19 and works with Next.js, Remix, and other server-side rendering frameworks.

Why ReactUse?

FeatureDetails
110+ HooksCovers browser APIs, state management, DOM elements, effects, and integrations
TypeScript-FirstFull type definitions for every hook with generics support
Tree-ShakableImport only what you need; unused hooks are eliminated at build time
SSR CompatibleWorks seamlessly with Next.js, Remix, and other SSR frameworks
React 16.8 — 19Supports all modern React versions including React 19
Well DocumentedLive interactive examples and API references for every hook
Production ProvenUsed in production by Shopee, PDD, Ctrip, and Bambu Lab

Hook Categories

CategoryCountExamples
Browser48useClipboard, useColorMode, useMediaQuery, useGeolocation, useMouse, useNetwork
State24useLocalStorage, useDebounce, useToggle, useCounter, useSessionStorage, useThrottle
Effect20useEventListener, useTimeout, useInterval, useAsyncEffect, useDebounceFn, useMount
Element19useElementSize, useIntersectionObserver, useDraggable, useWindowSize, useResizeObserver
Integrations1+useQRCode and more coming

How to Install ReactUse

Install the @reactuses/core package using your preferred package manager:

# npm
npm i @reactuses/core

# yarn
yarn add @reactuses/core

# pnpm
pnpm add @reactuses/core

Getting Started

Import any hook directly from @reactuses/core. Each hook is individually tree-shakable, so your bundle only includes the hooks you actually use.

import { useToggle } from '@reactuses/core'

function Demo() {
  const [on, toggle] = useToggle(true)

  return (
    <div>
      <div>{on ? 'ON' : 'OFF'}</div>
      <button onClick={toggle}>Toggle</button>
      <button onClick={() => toggle(true)}>set ON</button>
      <button onClick={() => toggle(false)}>set OFF</button>
    </div>
  )
}

ReactUse vs Other React Hook Libraries

FeatureReactUsereact-useahooks
Hook Count110+~100~60
TypeScript-FirstYesPartialYes
Tree-ShakableYesNoYes
SSR CompatibleYesPartialYes
React 19 SupportYesNoNo
Actively MaintainedYesInactive since 2023Yes

Frequently Asked Questions

Is ReactUse free to use?

Yes. ReactUse is released under the Unlicense, making it free for both personal and commercial use with no restrictions.

Does ReactUse work with Next.js?

Yes. All ReactUse hooks are SSR-compatible and work with Next.js App Router and Pages Router, Remix, Gatsby, and other React SSR frameworks.

Does ReactUse support React 19?

Yes. ReactUse supports React 16.8, 17, 18, and 19. Peer dependency compatibility is maintained across all modern React versions.

How does ReactUse compare to VueUse?

ReactUse is inspired by VueUse and brings a similar developer experience to the React ecosystem. It mirrors many of the same hook concepts adapted for React’s hooks API.

Can I use ReactUse with JavaScript instead of TypeScript?

Yes. While ReactUse is written in TypeScript and provides full type definitions, it works in plain JavaScript projects without any additional configuration.