@chooks/use-click

1.0.0 • Public • Published

Usage

요소의 클릭을 감지하고 클릭이 발생하면 특정 함수를 실행시킨다.

export const App = () => {
    const sayHello = () => console.log("hello");
    const title = useClick(sayHello);
    return <h1 ref={title}>Hi</h1>;
};

Readme

Keywords

Package Sidebar

Install

npm i @chooks/use-click

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

1.44 kB

Total Files

4

Last publish

Collaborators

  • chchaeun