-
-
Save GraceChiamaka/808919d5dcdd96d43b48c0c1bdc0d190 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> | |
<head> | |
<title>React</title> | |
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
</head> | |
<body> | |
<div id='app'></div> | |
<script> | |
const name = 'Tyler' | |
const handle = '@tylermcginnis' | |
const nameElement = React.createElement( | |
'h1', | |
null, | |
name | |
) | |
const handleElement = React.createElement( | |
'h3', | |
null, | |
handle | |
) | |
const wrapperElement = React.createElement( | |
'div', | |
{ id: 'container' }, | |
nameElement, | |
handleElement | |
) | |
console.log('wrapperElement', wrapperElement) | |
ReactDOM.render( | |
wrapperElement, | |
document.getElementById('app') | |
) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment