I'm working on a layout with three divs in each row, and there are multiple rows. Only one div can be selected at a time within a row, and selecting a new div will automatically unselect the previously selected one. Here is a simplified version of my code:
<div className="row">
<div className="heil select"><button>Click One</button></div>
<div className="heil"><button>Click Two</button></div>
<div className="heil"><button>Click Three</button></div>
</div>
...
The select class is used to highlight the clicked div. I need help implementing this functionality dynamically in React, where only one div in each row can be selected (similar to a radio button). I'm new to ReactJS, so any guidance would be greatly appreciated. Thank you!