Created
July 1, 2015 08:37
-
-
Save nilshartmann/fb68c34a461d922cd86c to your computer and use it in GitHub Desktop.
Using babel browser.js to compile ES6 and JSX code
This file contains 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> | |
<script src="./react-0.13.3.min.js"></script> | |
<script src="./browser.min.js"></script> | |
</head> | |
<body> | |
<div id="mount"></div> | |
</body> | |
<script type="text/babel"> | |
class MessageComponent extends React.Component { | |
render() { | |
return <h1>Hello World!</h1>; | |
} | |
} | |
React.render(<MessageComponent />, document.getElementById('mount')); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment