Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="it">
- <head>
- <meta charset="UTF-8">
- <title>Primo esempio di pagina che usa React</title>
- </head>
- <body>
- <div id="radice"></div>
- <!-- Inclusione di React e React-dom -->
- <script src="https://unpkg.com/react@16.7.0/umd/react.production.min.js"></script>
- <script src="https://unpkg.com/react-dom@16.7.0/umd/react-dom.production.min.js"></script>
- <!-- Inclusione del transpiler Babel -->
- <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
- <script type="text/babel">
- const elementoReact = <h1>Hello, React!</h1>;
- const radice = document.querySelector('#radice');
- ReactDOM.render(elementoReact, radice);
- console.log(elementoReact);
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment