Suppose by selecting from drop down:
<select onChange={newfetchVendor}>
<option value ={'narnia}>Narnia</option>
<option value ={'simba}>Simba</option>
</select>
In function newfetchVenodr:
async function newfetchVendor(e) {
if (!!e) {
let bestMovie = {`{e.target.value}`:'This is a good Movie'}
//this throws error
}
}
How can I set value inside bestMovie in key whatever movie is selected from dropdown?