React 支持JS

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="js/react.js"></script>
<script src="js/react-dom.js"></script>
<script src="js/browser.min.js"></script>
</head>
<body>

<div id="example"></div>

<script type="text/babel">

ReactDOM.render(
<div>
<h1>{3+4}</h1>
<p>{3==2?'true':'false'}</p>
</div>,
document.getElementById('example')
)

</script>

</body>
</html>
posted @ 2017-08-09 09:14  ThisCall  阅读(302)  评论(0编辑  收藏  举报