How to close modal on Clicking Outside react component?
Unanswered
Rex posted this in #help-forum
RexOP
I have a component in my react app, it is a bottom bar so it's fixed to the screen, how can I detect if the user is clicking outside the component?
2 Replies
@Nelson Write a custom hook:
https://dev.to/rashed_iqbal/how-to-handle-outside-clicks-in-react-with-typescript-4lmc
RexOP
Thank youuu!
This website was really helpful 🙂
This website was really helpful 🙂