
Here, when I click bitcoin. Parent component sends bitcoin as title. I don’t want to include bitcoin in the select tag.
>Solution :
You are returning the option directly from your map function, if you want to add logic inside just add {} and a return statement inside
{coins.map((item) => {
// you can put your logic here
// for example just first 2 letters
const customTitle = item.title.slice(0, 2)
return (
<option>{customTitle}</option>
)
})}
You can read more about arrow functions here
