useThrottle
Package: @tesserix/hooks
Hook that throttles a value
Import
import { useThrottle } from '@tesserix/hooks'Source
- Hook:
packages/hooks/src/use-throttle.ts
Usage
import { useThrottle } from '@tesserix/hooks'
export function DemouseThrottle() {
const throttled = useThrottle(scrollY, 200)
return null
}