const { createElement} = React
const { render } = ReactDOM
const title = createElement(
'h1',
{id: 'title', className: 'header'},
'Hello World'
)
render(
title,
document.getElementById('react-container')
)
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://facebook.com/react-15.1.0.js"></script>
<script src="https://facebook.com/react-dom-15.1.0.js"></script>
<meta charset="UTF-8">
<title>Hello World with React</title>
</head>
<body>
<div id = "react-container"></div>
<script src = "index.js"></script>
</body>
</html>
When I enter in my code, the local host:3000 server will not load. It says that React is undefined. Here is what I'm talking about Do I need to install something? I have node.js installed, and was working with it so I'm a bit confused. Thank you!
P.S - I used fb.me in the original script, but had to change it to facebook.com.