how to use map for iterating in reactjs code example
Example 1: how map work in react
{this.state.data.map((person) => <TableRow key = {shortid.generate()} data = {person} />)}
Example 2: react loop through array
this.items = this.state.cart.map((item, key) => <li key={item.id}>{item.name}</li>);