1{this.state.data.map((person) => <TableRow key = {shortid.generate()} data = {person} />)}
1function MapComponent(){
2 const [myMap, setMyMap] = useState(new Map());
3 const updateMap = (k,v) => {
4 setMyMap(new Map(myMap.set(k,v)));
5 }
6 return(
7 <ul>
8 {[...myMap.keys()].map(k => (
9 <li key={k}>myMap.get(k)</li>
10 ))}
11 </ul>
12 );
13}