-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
28 lines (27 loc) · 923 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<head>
<title>React Minus NPM</title>
<script src="/js/react.16.0.0.min.js"></script>
<script src="/js/react-dom.16.0.0.min.js"></script>
</head>
<!--based on the tutorial found at: https://medium.com/@clmyles/react-without-npm-babel-or-webpack-1e9a6049714 -->
<body>
<div id="root"></div>
<script>
window.onload = function()
{
class HelloWorld extends React.Component
{
render()
{
return React.createElement('h1', null, 'Hello World, ' + this.props.greeting);
}
}
ReactDOM.render(
React.createElement(HelloWorld, { greeting : 'I\'m back!' }),
document.getElementById('root')
);
};
</script>
</body>
</html>