populate select element from state in react
With a map function, it should return something. In your map function it doesn't return anything.
Modified code
{updateSelect.map((data) => {
console.log("getting data", data.name);
return (
<option key={data.name} value={data.name}>
{data.name}
</option>
);
})}
This should now work properly.
Thanks,
Arjis Chakraborty.