Created
January 18, 2020 20:40
-
-
Save leon0707/0c35c2cc6cbf734baee51b7035d7e1ec to your computer and use it in GitHub Desktop.
react starter
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> | |
| <body> | |
| <div id="root"></div> | |
| <script src="https://unpkg.com/react@16.3.2/umd/react.production.min.js"></script> | |
| <script src="https://unpkg.com/react-dom@16.3.2/umd/react-dom.production.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js" charset="utf-8"></script> | |
| <script type="text/babel"> | |
| function Greeter(props) { | |
| return <div>Hello {props.user}</div>; | |
| } | |
| class App extends React.Component { | |
| render() { | |
| return (<Greeter user="Admin" />); | |
| } | |
| } | |
| const rootElement = document.getElementById("root"); | |
| ReactDOM.render(<App />, rootElement); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment