how to render a map in react code example
Example 1: react map
const numbers = [1, 2, 3, 4, 5];
const doubled = numbers.map((number) => number * 2);console.log(doubled);
Example 2: how map work in react
{this.state.data.map((person) => <TableRow key = {shortid.generate()} data = {person} />)}