JSFiddle - React, Tailwind, and code Playground
HTML
<select name="options" id="options" style="width: 100px;" onclick="javascript:chooseOption(this);">
</select>
JavaScript
window.chooseOption = function() {
var choices = ["Gym", "Pool", "Sports"];
var myChoice = "";
var option = document.createElement("option");
for (i = 0; i <= choices.length; i++) {
myChoice += "<option value='" + choices[i] + "'>" + choices[i] + "</option>";
document.getElementById("options").innerHTML = myChoice;
}
}