How do i prevent the OnClick function within the buttom from beeing called whenever the list is rendered?
{this.state.citylist && this.state.citylist.map((city, index) =>
<li key={index}>
{city.name}
<button type="button" onClick={console.log(city.name)}>Click me</button>
</li>
)}
as always, thanks for your help.