Created
July 20, 2018 16:52
-
-
Save gsrai/adead25798a7112040fd57a02ed85f9c to your computer and use it in GitHub Desktop.
Simplest React App all in one html file, using: React & Babel
This file contains hidden or 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> | |
<title>React::Inline</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script crossorigin src="https://unpkg.com/[email protected]/umd/react.production.min.js" integrity="sha384-nknFr2hIJEELeBc74Ig3GPXUXITBKkPCdvhYiaI9N/z4w29fBDju2T1Fa8UYtYXY"></script> | |
<script crossorigin src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js" integrity="sha384-g1NqDjFFQF767CjS9GU3C/p4dLd900G4Uuxfw2GGBGI0sYo0MKCbyl+EYI2OQyWZ"></script> | |
<script crossorigin src="https://unpkg.com/[email protected]/babel.min.js" integrity="sha384-VgZgZqjY9Fh+YsIGYp/Vzpbz9fdsC3TLwB4MrpOstd9QcaJdH/8aYw5vwisv8i8d"></script> | |
<script type="text/babel"> | |
class App extends React.Component { | |
render() { | |
return( | |
<h1>React {React.version} & Babel all in one line</h1> | |
) | |
} | |
} | |
ReactDOM.render( | |
<App />, | |
document.getElementById('app') | |
) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment