npm i live-server -g
live-server
Last active
November 21, 2018 13:31
-
-
Save aceakash/1270a182c3e57da80c3bcb9951603c23 to your computer and use it in GitHub Desktop.
React quick start
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> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Add React in One Minute</title> | |
</head> | |
<body> | |
<!-- We will put our React component inside this div. --> | |
<div id="root"></div> | |
<!-- Load React. --> | |
<!-- Note: when deploying, replace "development.js" with "production.min.js". --> | |
<script src="https://unpkg.com/[email protected]/umd/react.development.js" crossorigin></script> | |
<script src="https://unpkg.com/[email protected]/umd/react-dom.development.js" crossorigin></script> | |
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> | |
<!-- Load our React component. --> | |
<script type="text/babel" src="main.js"></script> | |
</body> | |
</html> |
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
'use strict'; | |
function App(props) { | |
return ( | |
<h1>Hello world</h1> | |
) | |
} | |
const domContainer = document.querySelector('#root'); | |
ReactDOM.render(<App />, domContainer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment