Why is React useEffect clean-up function being run right after the useEffect callback, and then never again?

后端 未结 0 1742
暗喜
暗喜 2020-12-16 05:07

I have a small React app with a component that has a button that opens a small menu, and I\'d like it to close the menu when the user clicks anywhere outside the component.<

相关标签:
回答
  • 消灭零回复
提交回复
热议问题