Skip to content

Instantly share code, notes, and snippets.

@vuldin
Created July 8, 2021 11:53
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 vuldin/1107d57f8f9b91b698e1deff2e8c4205 to your computer and use it in GitHub Desktop.
Save vuldin/1107d57f8f9b91b698e1deff2e8c4205 to your computer and use it in GitHub Desktop.
An HTML file that uses Babel to display a simple React component
<!DOCTYPE html>
<html lang="en">
<head>
<title>Simple React</title>
<meta charset="utf-8" />
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
<script src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@7.0.0-beta.3/babel.min.js"></script>
</head>
<body>
<div id="root"></div>
<script type="text/babel">
function Hello() {
return <h1>Hello</h1>
}
ReactDOM.render(<Hello />, document.getElementById('root'))
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment