Last active
December 4, 2017 18:47
-
-
Save stovak/12871f71a63c15c8e68286ead197c395 to your computer and use it in GitHub Desktop.
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> | |
<!-- | |
| | |
| This file will allow you to create a .jsx component without actually setting up a dev environment. | |
| | |
| | |
--> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Hello React</title> | |
<script src="https://fb.me/react-15.0.0.js"></script> | |
<script src="https://fb.me/react-dom-15.0.0.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script> | |
<style> | |
/** Styles for your component go here **/ | |
</style> | |
</head> | |
<body> | |
<script type="text/babel"> | |
var HelloReact = React.createClass({ | |
constructor: function(props) { | |
super(props); | |
this.name = "HelloReact"; | |
}, | |
render: function() { | |
return ( | |
<section | |
id={this.name} | |
data-type="jsx-component" | |
data-component={"React/".concat(this.name)} | |
> | |
<header> | |
<h1>Hello React</h1> | |
</header> | |
<main> | |
</main> | |
<footer> | |
</footer> | |
</section> | |
); | |
} | |
}); | |
ReactDOM.render( < HelloReact / > , document.getElementById('root')); | |
</script> | |
<div id="root"> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment