Skip to content

Instantly share code, notes, and snippets.

@StoneCypher
Created October 19, 2017 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StoneCypher/d75512b91dce0192b7267c40ca48e901 to your computer and use it in GitHub Desktop.
Save StoneCypher/d75512b91dce0192b7267c40ca48e901 to your computer and use it in GitHub Desktop.
Don't do this in prod, but when you're learning React or having fun, honestly, fuck the build toolchain entirely
<!DOCTYPE html>
<html lang="en">
<head>
<title>Toy non-Babel React from CDN example</title>
<script src="https://fb.me/react-15.0.0.js"></script>
<script src="https://fb.me/react-dom-15.0.0.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
<script type="text/babel">
var Greeting = props => <div>Hello, World</div>;
window.onload = () =>
ReactDOM.render(
<Greeting/>,
document.getElementById('greeting-div')
);
</script>
</head>
<body>
<div id="greeting-div"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment