Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save spcheema/7f327c2fc349ceefb96a8518025b854b to your computer and use it in GitHub Desktop.
Save spcheema/7f327c2fc349ceefb96a8518025b854b to your computer and use it in GitHub Desktop.
Get started with React & Babel
<div id="app"></div>
/*
* 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'));
<script src="//cdnjs.cloudflare.com/ajax/libs/react/0.13.0/react.min.js"></script>
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