Last active
December 19, 2017 13:59
-
-
Save mekicha/d738ce7dd8692aa57b1ce9acc75d5561 to your computer and use it in GitHub Desktop.
The Beginner's Guide to ReactJS by Kent C. Dodds
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
<div id="root"></div> | |
<script src="unpkg.com/react@16.0.0/umd/react.production.min.js"></script> | |
<script src="unpkg.com/react-dom@16.0.0/umd/react-dom.production.min.js | |
"></script> | |
<script type="text/javascript"> | |
// const rootElement = document.getElementById('root'); | |
// const element = document.createElement('div'); | |
// element.textContent = 'Hello World'; | |
// element.className = 'container'; | |
// rootElement.appendChild(element); | |
const rootElement = document.getElementById('root'); | |
const element = React.createElement( | |
'div', | |
{className: 'container'}, | |
'Hello World' | |
) | |
ReactDOM.render(element, rootElement) | |
</script> |
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
<div id="root"></div> | |
<script src="unpkg.com/react@16.0.0/umd/react.production.min.js"></script> | |
<script src="unpkg.com/react-dom@16.0.0/umd/react-dom.production.min.js | |
"></script> | |
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> | |
<script type="text/babel"> | |
const rootElement = document.getElementById('root'); | |
const content = "hello world" | |
const className = 'container' | |
const props = { content, className } | |
const element = <div{ ..props } /> | |
ReactDOM.render(element, rootElement) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment