Skip to content

Instantly share code, notes, and snippets.

@juanmaguitar
Last active September 28, 2017 07:35
Show Gist options
  • Select an option

  • Save juanmaguitar/37c2e206b50d749cf7109e7df6e31cbe to your computer and use it in GitHub Desktop.

Select an option

Save juanmaguitar/37c2e206b50d749cf7109e7df6e31cbe to your computer and use it in GitHub Desktop.
React index html scripts cdn
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
const mountNode = document.getElementById('root')
function Button (props) {
// Returns a DOM element here. For example:
return <button type="submit">{props.label}</button>;
}
// To render the Button component to the browser
ReactDOM.render(<Button label="Save" />, mountNode)
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment