Skip to content

Instantly share code, notes, and snippets.

@pvin
Last active July 7, 2018 09:09
Show Gist options
  • Save pvin/3e7fa5ab5b4424df86baff3cfd99b56c to your computer and use it in GitHub Desktop.
Save pvin/3e7fa5ab5b4424df86baff3cfd99b56c to your computer and use it in GitHub Desktop.
react and jsx sample
<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/babel-core@5.8.38/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