React (standalone)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function App(props) { | |
return <h1>Hello, world!</h1> | |
} | |
ReactDOM.render(<App />, document.querySelector('#root')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script> | |
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script> | |
<script crossorigin src="https://unpkg.com/@babel/standalone/babel.min.js"></script> | |
<script type="text/babel" src="./app.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://codepen.io/hankwang/pen/KKRjBjB