Last active
July 6, 2018 03:23
-
-
Save laniehei/1876032e23f6b912530b19c5775ec830 to your computer and use it in GitHub Desktop.
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>svideo</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="node_modules/react/dist/react.js"></script> | |
<script src="node_modules/react-dom/dist/react-dom.js"></script> | |
<script> | |
const MyTitle = function () { | |
return ( | |
React.createElement('div', null, | |
React.createElement('h1', null, 'My second component') | |
) | |
) | |
} | |
const MyFirstComponent = function () { | |
return React.createElement('div', { id: 'my-first-component'}, | |
React.createElement(MyTitle), | |
React.createElement(MyTitle), | |
React.createElement(MyTitle), | |
React.createElement(MyTitle) | |
) | |
} | |
ReactDOM.render( | |
React.createElement(MyFirstComponent), | |
document.getElementById('app') | |
) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment