Basically I have these <img/> elements kind of like a bunch of buttons stacked like a table. In the code, they are created through a loop (.map() in React.js).
I want to know the most practical and semantically-efficient way to implement a way to click a button and have it "turn over" or basically show a new element, say a <p></p>, in its place.
Should I have the <img /> be wrapped in a or maybe a <div>? Or nothing at all?
I can think of several ways to implement the functionality I described above, such as having the <p></p> display 'none' originally, and when clicked display 'initial.' I implemented that in a JavaScript DOM event listener, but I am trying a new approach with React and I believe that my code was very rudimentary and inefficient.
How can I approach this 'click and flip' functionality in React.js? it "turn over" or basically show a new element, say a <p></p>, in its place.