I was working on creating a gallery of Unsplash images that would display a full-screen image when the user clicked on a small image. I implemented a modal window that should appear when the user clicks on the small image, and I wanted it to close when the user clicked anywhere within the modal window. I wrote an anonymous function to change the active status to false, but when I tested it, nothing happened.
For reference, here is the code - https://stackblitz.com/edit/react-jis6bz