How do you create a very, very simple dropdown select with React? Nothing seem to work.
I have an array: var num = [1,2,3,4,5]
Function:
num(e){
this.setState({selected: e.target.value});
}
In the render:
<select option="{num}" value={this.state.selected} onChange={this.num} />
No error message, no nothing. I normally use npm plugin for this but I only need something basic.
option="{num}". You need<option>tags.