Last active
September 28, 2017 07:35
-
-
Save juanmaguitar/37c2e206b50d749cf7109e7df6e31cbe to your computer and use it in GitHub Desktop.
React index html scripts cdn
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> | |
| <meta charset="UTF-8" /> | |
| <title>Hello World</title> | |
| <script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
| <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
| <script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="root"></div> | |
| <script type="text/babel"> | |
| const mountNode = document.getElementById('root') | |
| function Button (props) { | |
| // Returns a DOM element here. For example: | |
| return <button type="submit">{props.label}</button>; | |
| } | |
| // To render the Button component to the browser | |
| ReactDOM.render(<Button label="Save" />, mountNode) | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment