Created
January 6, 2018 19:26
-
-
Save Senhordim/66bf60f2423e9c230b90ddd4c3898b96 to your computer and use it in GitHub Desktop.
Hello word with React
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Hello Word with React!</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.2/react.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/15.6.2/react-dom.js"></script> | |
<script> | |
// Criando elemento com createElement | |
// Espera 3 argumentos(tag, propiedade, conteúdo) | |
var h1 = React.createElement('h1', null, 'Hello React Word!'); | |
// ReactDOM.render() Insere objeto "Elemento no DOM" | |
ReactDOM.render(h1, document.getElementById('app')); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment