Last active
April 2, 2019 09:45
-
-
Save vizioners/f8aa9ed5a5d855c308562417f16dc165 to your computer and use it in GitHub Desktop.
Add React to a Website
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></head> | |
<body> | |
<div id="root"></div> | |
<script src="https://unpkg.com/react@16/umd/react.production.min.js"></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script> | |
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> | |
<script type="text/babel"> | |
class Greeting extends React.Component { | |
render() { | |
return (<p>Hello world</p>); | |
} | |
} | |
ReactDOM.render( | |
<Greeting />, | |
document.getElementById('root') | |
); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment