Reputation: 1658
I see lots of people converting data to arrays with methods not possible to me as far as I can see.
I am using react and typescript and have a very simple map that I wish to render as a list of buttons
Here is what I have so far
const renderPlayerChoice = (indexMap: Map<number, number>) => {
// What I would like to do if it was possible
return indexMap.map((key, value =>{
// do stuff here
return stuff
})
}
But the map function does not exist for this object it only has a foreach which does not return any results
Upvotes: 0
Views: 1481