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