@hyperobjekt/hooks

1.1.1 • Public • Published

@hyperobjekt/hooks

This repository contains hooks that are re-used among hyperobjekt projects.

useDebounce(value, delay)

This hook is used to reduce re-renders when you have a value that updates many times within a short period of time. Full docs can be found on the useHooks site.

useDidUpdateEffect(callback, inputs)

This hook is the same as useEffect, but runs only on subsequent updates instead of on mount.

useInterval(callback, delay)

This hook is used to execute a function on a regular interval within a react component.

useKeyPress(targetKey)

Used to capture if a target key is currently pressed. Full docs can be found on the useHooks site.

usePrevious(value)

Used to capture a variables value from the last render. Full docs can be found on the useHooks site.

useWindowSize()

Provides the width / height of the window when run within the browser. Full docs can be found on the useHooks site.

/@hyperobjekt/hooks/

    Package Sidebar

    Install

    npm i @hyperobjekt/hooks

    Weekly Downloads

    10

    Version

    1.1.1

    License

    none

    Unpacked Size

    24.1 kB

    Total Files

    19

    Last publish

    Collaborators

    • chris_hull
    • laneolson