Not sure the proper vocabulary so I had trouble googling this. Basically I send a get request
http://localhost:8080/api/v1/getstuff
it will return me option tags for my scroll down. Using axios so basically,
componentDidMount() {
axios.get("http://localhost:/8080/api/v1/getstuff"
)
.then((response) => {
this.setState({ stuff: response.data })
})
.catch(function (error) {
console.log(error);
});
}
stuff is now set to this:
and I placed it inside a select tag but it comes out as
"<option value='hello'>hello</option>
<option value='hello2'>hello2</option>
<option value='sss'>sss</option>"
rather than
<option value='hello'>hello</option>
<option value='hello2'>hello2</option>
<option value='sss'>sss</option>
Which makes it so the option tags don't show up. How to fix?