Created
January 15, 2016 12:33
-
-
Save pe3/4a8f71c8ca7446f62928 to your computer and use it in GitHub Desktop.
Simplest React dev boilerplate
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"> | |
<title></title> | |
<script src="https://npmcdn.com/[email protected]/dist/react.js" charset="utf-8"></script> | |
<script src="https://npmcdn.com/[email protected]/dist/react-dom.js" charset="utf-8"></script> | |
<script src="https://npmcdn.com/[email protected]/browser-polyfill.min.js" charset="utf-8"></script> | |
<script src="https://npmcdn.com/[email protected]/browser.min.js" charset="utf-8"></script> | |
</head> | |
<body> | |
<div id="react-root"></div> | |
<script type="text/babel"> | |
"use strict"; | |
class HelloMessage extends React.Component { | |
render() { | |
return <div>Hello {this.props.name}!!!</div>; | |
} | |
} | |
ReactDOM.render(React.createElement(HelloMessage, { name: "Petri" }), document.querySelector('#react-root')); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment