Skip to content
Permalink
Browse files

import react, create and render our first component

  • Loading branch information...
nicoqh committed Jun 3, 2019
1 parent 119047e commit a89fcf56aa5f477af24512ab1cfe8c80263a91d2
Showing with 12 additions and 2 deletions.
  1. +1 −0 src/index.html
  2. +11 −2 src/index.js
@@ -5,5 +5,6 @@
<title>Boilerplate!</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
@@ -1,3 +1,12 @@
const greet = name => console.log(`Hello, ${name}`);
import React from 'react';
import ReactDOM from 'react-dom';

greet('Jon Snow');
function Root() {
return <h1>Hello, world.</h1>;
}

// Render the Root element into the DOM
ReactDOM.render(
<Root />,
document.getElementById('root'),
);

0 comments on commit a89fcf5

Please sign in to comment.
You can’t perform that action at this time.