@jgordy24/react-hooks-lib

1.4.2 • Public • Published

@jgordy24/react-hooks-lib

"A package of commonly used react hooks"

Build

Install

npm install --save @jgordy24/react-hooks-lib

Usage

useHover

import React from 'react';
import { useHover } from '@jgordy24/react-hooks-lib';

const App = () => {
  const [hoverRef, isHovered] = useHover();

  return (
    <div>
      <button
        ref={hoverRef}
        style={{
          backgroundColor: isHovered ? '#424242' : '#121212',
          color: '#FFF',
        }}
      >
        My Button
      </button>
    </div>
  )
}
more examples coming soon

License

MIT © JGordy


This hook is created using create-react-hook.

Readme

Keywords

none

Package Sidebar

Install

npm i @jgordy24/react-hooks-lib

Weekly Downloads

0

Version

1.4.2

License

MIT

Unpacked Size

118 kB

Total Files

17

Last publish

Collaborators

  • jgordy24