Skip to content

Instantly share code, notes, and snippets.

@airportyh
Last active January 20, 2017 14:31
Show Gist options
  • Select an option

  • Save airportyh/f0547b7c9fb41f6a0845b686b26d4ccc to your computer and use it in GitHub Desktop.

Select an option

Save airportyh/f0547b7c9fb41f6a0845b686b26d4ccc to your computer and use it in GitHub Desktop.
Quickstart template for getting started with learning basic React without all the cruft of setting up a build environment.
class MyThing extends React.Component{
render() {
return <div>Hello, world!</div>;
}
}
ReactDOM.render(<MyThing/>, document.getElementById('root'));
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Babel Quickstart</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.21.1/babel.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.4.2/react-dom.js"></script>
</head>
<body>
<div id="root"></div>
<script type="text/babel" src="app.js" data-presets="react"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment