I want to create multiple options with the items in the "championList" but my function only returns one option with "Aatrox" and ignore the others, what should I do?
class ChampionSelect extends React.Component {
constructor(props) {
super(props);
this.state = {
champion: require('../loldata/champion.json'),
championList: ['Aatrox', 'Ahri', 'Akali', 'Akshan', 'Alistar', 'Amumu', 'Anivia', 'Annie', 'Aphelios', 'Ashe', 'Aurelion', 'Azir', 'Bard', 'Blitzcrank' ]
};
this.funcOption = this.funcOption.bind(this);
}
funcOption() {
for (let i = 0; i < this.state.championList.length; i++) {
return <option value={this.state.championList[i]}>{this.state.championList[i]}</option>
}
}
render() {
return (
<div> teste:
<select>
{this.funcOption()}
<option>teste</option>
</select>
</div>
);
}
}
export default ChampionSelect;```