Last active
July 7, 2018 09:09
-
-
Save pvin/3e7fa5ab5b4424df86baff3cfd99b56c to your computer and use it in GitHub Desktop.
react and jsx sample
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
<html> | |
<head> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-dom.js"></script> | |
<script src="https://unpkg.com/[email protected]/browser.min.js"></script> | |
<script type="text/babel"> | |
var Message = React.createClass({ | |
render:function(){ | |
return <h1>Welcome to TutsPlus , {this.props.name}</h1> | |
} | |
}); | |
ReactDOM.render(<Message name='test'/>,document.getElementById('container')); | |
</script> | |
</head> | |
<body> | |
<div id="container"> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment