利用React遍历数组,并且用数组的元素生成<li>arrItem</li>标签组

var numbers = [1,2,3,4,5,6,7,8,9];

ReactDom.render({

  <ul>

    {

      numbers.map(function(item){

        return <li>{item}</li>

      })

    }

  </ul>,

  document.getElementById('app')

})

原文地址:https://www.cnblogs.com/lantuoxie/p/6923183.html