kayode-adechinan
6/13/2019 - 4:14 PM

reactjs_list_rendering_1.js

const numbers = [1, 2, 3, 4, 5];
const listItems = numbers.map((number) =>
  <li>{number}</li>
);

ReactDOM.render(
  <ul>{listItems}</ul>,
  document.getElementById('root')
);