Last active
August 5, 2018 08:56
-
-
Save noateden/693d1c9e2234f290056262828fa80340 to your computer and use it in GitHub Desktop.
Hello ReactJS
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> | |
<meta charset="UTF-8"> | |
<title>Getting started with ReactJS</title> | |
</head> | |
<body> | |
<div id="hello"></div> | |
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script> | |
<script type="text/javascript"> | |
/** @jsx React.DOM */ | |
'use strict' | |
const e = React.createElement; | |
const helloEle = document.querySelector('#hello'); | |
class HelloEle extends React.Component{ | |
// constructor(props){ | |
// super(props); | |
// }; | |
render(){ | |
return e( | |
'h1', | |
{}, | |
'Hello World' | |
); | |
} | |
} | |
ReactDOM.render(e(HelloEle), helloEle); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment