A Pen by Surinder pal Singh on CodePen.
Created
July 8, 2016 07:34
-
-
Save spcheema/7f327c2fc349ceefb96a8518025b854b to your computer and use it in GitHub Desktop.
Get started with React & Babel
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 id="app"></div> |
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
/* | |
* A simple React component | |
*/ | |
class Application extends React.Component { | |
render() { | |
return <div> | |
<h1>Hello, ES6 and React 0.13!</h1> | |
<p> | |
More info <a href="https://github.com/bradleyboy/codepen-react" target="_blank">here</a>. | |
</p> | |
</div>; | |
} | |
} | |
/* | |
* Render the above component into the div#app | |
*/ | |
React.render(<Application />, document.getElementById('app')); |
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
<script src="//cdnjs.cloudflare.com/ajax/libs/react/0.13.0/react.min.js"></script> |
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
html, body | |
height: 100% | |
body | |
background: #333 | |
display: flex | |
justify-content: center | |
align-items: center | |
font-family: Helvetica Neue | |
h1 | |
font-size: 2em | |
color: #eee | |
display: inline-block | |
a | |
color: white | |
p | |
margin-top: 1em | |
text-align: center | |
color: #aaa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment