First we set the default state in the constructor
this.state = { myValue: "default" }
Then we build the option-elements
let options = ["value1", "value2", "value3"]; for (let i = 0; i < valg.length; i++) { options[i] = <option key={options[i]} value={options[i]}>{options[i}</option>); }
Finally we insert the select-box
<p>MyValue: <select value={this.state.myValue} onChange={(e) => this.setState({myValue: e.target.value})}>{options}</select></p>