手记

个人笔记react:helloworld编写

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello React!</title>
<script src="./js/react.js"></script>
<script src="./js/react-dom.js"></script>
<script src="https://npmcdn.com/babel-core@5.8.38/browser.min.js"></script>
</head>
<body>
<div id="example"></div>
<script type="text/babel">
var HelloWorld = React.createClass({
render: function(){
return <p>HelloWorld</p>
}
});
ReactDOM.render(<HelloWorld></HelloWorld>,
document.getElementById('example'));
</script>
</body>
</html>

0人推荐
随时随地看视频
慕课网APP