I want to use an if statement inside a map, but i dont want to switch the return. Code:
this.example = this.state.data.map((item) => {
return(
<div>
{if(1 + 1 == 2){
data here
}}
</div>
)
})
I get that i dont understand how to use these inside of react. But basically, i need to return a link based on a logo that is returned inside the map. So if its logo A, then return Link A, Logo B, Link B, etc.
The logo is being mapped through an api, the link is not.