1.1.3 • Published 2 years ago

@jdthornton/useonclickoutside v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@jdthornton/useonclickoutside

npm (scoped) npm bundle size (minified)

React on click outside ref target hook.

Install

$ npm install @jdthornton/useonclickoutside

Usage

import useOnClickOutside from "@jdthornton/useonclickoutside";

function App({ handleClickOutside }){
  const ref = useRef();

  useOnClickOutside(ref, handleClickOutside)

  return(
    <div ref={ref}>
      Don't click outside!
    </div>
  )
}
1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago