Created
October 1, 2015 10:15
-
-
Save mattdell/a36e088d19592c788811 to your computer and use it in GitHub Desktop.
React Demo 3 - Props
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<script src="https://fb.me/react-0.13.3.js"></script> | |
<script src="https://fb.me/JSXTransformer-0.13.3.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.25.2/react-bootstrap.min.js"></script> | |
</head> | |
<body> | |
<div class="container"> | |
<div id="content"></div> | |
</div> | |
<script type="text/jsx"> | |
var HelloWorld = React.createClass({ | |
render: function() { | |
return ( | |
<div>Hello {this.props.name}</div> | |
); | |
} | |
}); | |
React.render(<HelloWorld name='Matt' />, document.getElementById('content')); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment