react-onclickoutside icon indicating copy to clipboard operation
react-onclickoutside copied to clipboard

Functional Component with UseState Hook

Open 0rsa opened this issue 5 years ago • 1 comments

It doesn't work if you use component multiple times.

Try author example: https://codesandbox.io/s/vn66kq7mml

Duplicate <Menu />

Run jsfiddle, handleClickOutside is only triggered for the last component added.

0rsa avatar Mar 10 '20 14:03 0rsa

Dupplicate of https://github.com/Pomax/react-onclickoutside/issues/329

I switched to react-cool-onclickoutside whichs works fine using hooks.

0rsa avatar Mar 11 '20 06:03 0rsa