react-js-03-数组标签

前端之家收集整理的这篇文章主要介绍了react-js-03-数组标签前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。


<!DOCTYPE html>
<html>
<head>
<script src="../build/react.js"></script>
<script src="../build/react-dom.js"></script>
<script src="../build/browser.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">

var arr=[

<h1>Hello world!</h1>,

<h2>React is awesome</h2>

];

ReactDOM.render(

<div>{arr}</div>,

document.getElementById('example')

);

</script>

</body>

</html>

原文链接:https://www.f2er.com/react/307080.html

猜你在找的React相关文章