Reactjs- How to choose the correct modal from a map of buttons-modals

Hello guys, my issue is that, i am trying to open a different modal in each button.But, for every button i am pushing i can see only the content of the last modal.As i noticed when i push one button, the open attribute for every modal is becoming true ( I tried several things by calling the switchSomething function onClick but it didn’t compiled really(i am getting the following error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.) Here 's the code . Any ideas