-
-
Save coder4cbus/7fad04c7c8c1437a1da99f6df9d5248e to your computer and use it in GitHub Desktop.
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> | |
<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> | |
<script src='https://unpkg.com/babel-standalone@6/babel.min.js'></script> | |
</head> | |
<body> | |
<div id='app'></div> | |
<script type='text/babel'> | |
function NameComponent ({ name }) { | |
return <h1>{name}</h1> | |
} | |
function HandleComponent ({ handle }) { | |
return <h3>{handle}</h3> | |
} | |
function App () { | |
return ( | |
<div id='container'> | |
<HandleComponent handle='@tylermcginnis' /> | |
<NameComponent name='Tyler' /> | |
</div> | |
) | |
} | |
ReactDOM.render( | |
<App />, | |
document.getElementById('app') | |
) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment