Some (almost all) hooks has been copied from internet foruns. If necessary look from source info to check who created the hook.
- useElementSize (Get element sizes using ref)
- useHover (control when a element is hovererd using ref)
- useOnClickOutside (Listen when clicked outside component using ref)
- usePersistedState (An option to persist state in local storage)
- usePrevious (Keep state value between current and previous render)
- useWindowSize (Get window sizes)
- useTimer (a count down minute / seconds)
- useClickOutside (An event handler to trigger an action by outside-click-element using ref)
- useOnPressKey (An event handler to trigger an action by key press using ref)
import {useElementSize} from '@gadeoli/rjs-hooks-library';
- Clone
- NVM use 22.13.1 (node 22.13.1 / npm 10.9.2)
- npm i
- make changes
- git add / git commit / git push
- npm run publish (custom command)
useElementSize
useHover
useOnClickOutside
usePersistedState
usePrevious
useWindowSize
useTimer
useClickOutside
useOnPressKey
some sources could be missing