Created
July 8, 2018 16:48
-
-
Save marschhuynh/6613bdb55d10bcd2d6ab139cfa5d3e79 to your computer and use it in GitHub Desktop.
Reactjs example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Hello React</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.1/react.min.js"> | |
</script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.1/react-dom.min.js"> | |
</script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"> | |
</script> | |
</head> | |
<body> | |
<div id="header"></div> | |
<div id="content"></div> | |
<div id="footer"></div> | |
<script type="text/babel"> | |
ReactDOM.render(<h1>Header</h1>, document.getElementById('header')); | |
ReactDOM.render(<h1>Content</h1>, document.getElementById('content')); | |
ReactDOM.render(<h1>Copyright@2018</h1>, document.getElementById('footer')); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment