Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional Component with UseState Hook #339

Open
0rsa opened this issue Mar 10, 2020 · 1 comment
Open

Functional Component with UseState Hook #339

0rsa opened this issue Mar 10, 2020 · 1 comment

Comments

@0rsa
Copy link

0rsa commented Mar 10, 2020

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
Copy link
Author

0rsa commented Mar 11, 2020

Dupplicate of #329

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant