Created
February 25, 2017 19:20
-
-
Save NatalieMac/42a1fb2cc2eefa5a60ea9cb7c332cc3f to your computer and use it in GitHub Desktop.
Intro to React // source http://jsbin.com/kuqekih
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> | |
<head> | |
<title>Intro to React</title> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-with-addons.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.5.2/redux.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-redux/4.4.5/react-redux.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/expect/1.20.1/expect.js"></script> | |
<style id="jsbin-css"> | |
div#app { | |
background-color: #fff; | |
border: thin dotted red; | |
margin: 3px; | |
padding: 5px; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script id="jsbin-javascript"> | |
var MyComponent = function() { | |
return ( | |
React.createElement("div", null, "Define MyComponent!") | |
); | |
} | |
ReactDOM.render( | |
React.createElement(MyComponent, null), | |
document.getElementById('app') | |
); | |
</script> | |
<script id="jsbin-source-css" type="text/css">div#app { | |
background-color: #fff; | |
border: thin dotted red; | |
margin: 3px; | |
padding: 5px; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var MyComponent = function() { | |
return ( | |
<div>Define MyComponent!</div> | |
); | |
} | |
ReactDOM.render( | |
<MyComponent />, | |
document.getElementById('app') | |
);</script></body> | |
</html> |
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
div#app { | |
background-color: #fff; | |
border: thin dotted red; | |
margin: 3px; | |
padding: 5px; | |
} |
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
var MyComponent = function() { | |
return ( | |
React.createElement("div", null, "Define MyComponent!") | |
); | |
} | |
ReactDOM.render( | |
React.createElement(MyComponent, null), | |
document.getElementById('app') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment