@marsidev/react-hooks

Common React hooks. Made with TypeScript.


Keywords
react, react-hooks, hooks, typescript
License
MIT
Install
npm install @marsidev/react-hooks@1.2.3

Documentation

@marsidev/react-hooks npm

A collection of common React hooks. Made with TypeScript. Bootstraped with antfu/starter-ts. Inspired by usehooks-ts, and @restart/hooks.

Install

  • Using npm

     npm i @marsidev/react-hooks
  • Using yarn

     yarn add @marsidev/react-hooks
  • Using pnpm

     pnpm add @marsidev/react-hooks

Usage

import { useScrollY } from '@marsidev/react-hooks'
const { offsetPassed, scrollDirection, scrollPosition } = useScrollY(300)

Available Hooks

  • useScrollY
  • useIsMounted
  • useInput