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

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

#1

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 (http://prntscr.com/jxif92). 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 https://gist.github.com/YannisKalaijakis/dc5e80d83e84d845fbde4487e4c866bf . Any ideas