Skip to content

A sample project react hook (in typescript) to detect click events outside an element.

Notifications You must be signed in to change notification settings

ChristopheLej/react-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A sample project react hook (in typescript) to detect click events outside an element.

Many thanks at Pitipat Srichairat for his article.

Ths project contains 3 same dropdown element with a different implementation:

  • DropdownNoneHooks: dropdown normal extends React.Component with state, ...
  • DropdownWithHooks: dropdown with hook in the FunctionComponent and all hooks are integrated in the code
  • DropdownWithCallback: dropdown with hook in the FunctionComponent but a generic hook (useClickOutside) is external of the function for reusing

About

A sample project react hook (in typescript) to detect click events outside an element.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published