Skip to content

Instantly share code, notes, and snippets.

@camilomontoyau
Created November 11, 2018 21:55
Show Gist options
  • Select an option

  • Save camilomontoyau/850c50ab7065d4f8642ab84d468df555 to your computer and use it in GitHub Desktop.

Select an option

Save camilomontoyau/850c50ab7065d4f8642ab84d468df555 to your computer and use it in GitHub Desktop.
react es js
<html>
<head>
<title>un título</title>
<meta charset="UTF-8" />
<style>
.letra-color-azul {
color: blue;
}
</style>
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="https://unpkg.com/react@16.6.1/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script type="text/javascript">
const app = document.getElementById('app'); // el mismo div id="app" que tenemos desde el repaso de javascript
const Button = React.createElement('button'); // El nuevo elemento usando la API de react
ReactDOM.render(Button, app); // Usando el ReactDOM para mostrar el elemento antes creado
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment