My modal is not working in ReactJS

Here’s my gist

When you setState of the show to true your whole data would be re-rendered/mapped and every item will pass new show prop to every Modal, are you sure this is behavior you want to have?

1 Like

I just want to show the modal onclick and nothing else , And the images should be fetched from the api. I’m learning it can you suggest the corrections. @snigo

I just want to show the image modal for each image individually onclick. And close it by clicking on modal background. How to solve this problem.