Built with blockbuilder.org
Created
July 2, 2019 11:12
-
-
Save aendra-rininsland/4b1f8955ea01ab1a51d6c4df0af06640 to your computer and use it in GitHub Desktop.
Basic React App
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
license: mit |
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> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> | |
<script | |
src="https://unpkg.com/react@16/umd/react.production.min.js" | |
crossorigin></script> | |
<script | |
src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js" | |
crossorigin></script> | |
</head> | |
<body> | |
<div id="app" /> | |
<script type="text/babel"> | |
const MyComponent = (props) => (<div>Hi {props.name}!</div>); | |
const App = ({username, age, favouriteColor, ...props}) => (<div> | |
<h1>Our App!</h1> | |
<MyComponent username={username} name={username} /> | |
</div>); | |
ReactDOM.render(<App username="Aleks" />, document.getElementById('app')); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment