Created
December 8, 2020 20:15
-
-
Save abelsan/2655e2cdd864384694e4de43c1eb383c to your computer and use it in GitHub Desktop.
Standalone html file React.JS template
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> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Template</title> | |
<!-- don't use this in production: --> | |
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> | |
</head> | |
<body> | |
<h1>Template</h1> | |
<!-- we will put our teact component inside this div --> | |
<div id="root"></div> | |
<!-- load react --> | |
<script src="https://unpkg.com/react/umd/react.development.js" crossorigin></script> | |
<script src="https://unpkg.com/react-dom/umd/react-dom.development.js" crossorigin></script> | |
<!-- load our react component. --> | |
<script src="index.js" defer type="text/babel"></script> | |
</body> | |
</html> |
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
ReactDOM.render( | |
<h1>Hello World!</h1>, | |
document.getElementById('root') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment