@am-hooks/use-hover

Detect when mouse moves

Usage no npm install needed!

<script type="module">
  import amHooksUseHover from 'https://cdn.skypack.dev/@am-hooks/use-hover';
</script>

README

useHover

마우스를 올렸을 때 감지

Installation

yarn

yarn add @am-hooks/use-hover

npm

npm i @am-hooks/use-hover

Usage

import React from "react";
import useHover from "@am-hooks/use-hover";

const App = () => {
  const sayHover = () => console.log("마우스 올림");
  const title = useHover(sayHover);

  return <h1 ref={title}>HELLO</h1>;
}