0.22.0 • Published 12 months ago

@vulppi/react-hooks v0.22.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Vulppi React Hooks

Installation

npm install @vulppi/react-hooks

Usage

import { useTimer } from '@vulppi/react-hooks'

const Component = () => {
  const [time, { start, stop, restart }] = useTimer()

  return (
    <div>
      <div>{time}</div>
      <button onClick={start}>Start</button>
      <button onClick={stop}>Stop</button>
      <button onClick={restart}>Restart</button>
    </div>
  )
}

Hooks table

HookDescription
useBooleanA hook to create and control a boolean.
useClickOutsideA hook to detect click outside of an element.
useDebounceA hook to debounce a function.
useDebounceTriggerA hook to debounce before triggering a function.
useIntervalA hook to create and control an interval.
useIsMountedA hook to check if component is mounted.
useMediaQueryA hook to check if media query matches.
useMergeRefA hook to merge multiple refs.
useRerenderA hook to force component to rerender.
useStateDebounceA hook to debounce a state.
useTimeoutA hook to call function after a timeout.
useTimerA hook to create and control a timer.

License

MIT © Vulppi

0.22.0

12 months ago

0.21.0

2 years ago

0.20.1

2 years ago

0.21.1

2 years ago

0.18.0

2 years ago

0.17.4

2 years ago

0.17.5

2 years ago

0.17.3

2 years ago

0.17.2

2 years ago

0.16.0

2 years ago

0.17.1

2 years ago

0.15.4

2 years ago

0.15.3

2 years ago

0.15.2

3 years ago

0.15.1

3 years ago

0.15.0

3 years ago