Repository navigation
1.2.0
usethishook 1.2.0
Minor release: seven new hooks, optional custom locales for useAmountInput, and playground New badges. No breaking changes. The library now ships 40 typed hooks.
npm i usethishook@^1.2.0Playground: usethishook.mentorbridge.in
State
useSessionStorage— JSON state insessionStorage(same shape asuseLocalStorage)useThrottle— throttle a value (leading + trailing)
Browser
useScrollLock— lock / unlockdocument.bodyscroll for overlaysuseDocumentVisibility— Page Visibility API (visible|hidden)useIdle— true after a period of no user activity
App
useThrottledCallback— throttle a function, with canceluseUpdateEffect— likeuseEffect, but skips the initial mount
Forms
useAmountInput— optionallocalesmap to register or override separators beyond built-inen/de/nl/fr- Exported
AmountLocaleConfigtype