adding list items in react

Solutions on MaxInterview for adding list items in react by the best coders in the world

showing results for - "adding list items in react"
Benedict
05 Feb 2016
1const numbers = [1, 2, 3, 4, 5];
2const listItems = numbers.map((number) =>  <li>{number}</li>);
3                              
4ReactDOM.render(
5  <ul>{listItems}</ul>, document.getElementById('root')
6);