-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgoodbye.html
39 lines (33 loc) · 1006 Bytes
/
goodbye.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
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html>
<head>
<title>My Second React App</title>
</head>
<body>
<div id="app"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.1.0/umd/react.development.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.1.0/umd/react-dom.development.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
<script type="text/babel">
class Goodbye extends React.Component {
constructor(props){
super(props);
this.state = {
number: 2
}
}
render() {
return (
<div>
<h1>Have a nice day {this.props.name}!</h1>
<h3>Months till we meet again: {this.state.number}</h3>
</div>
);
}
}
ReactDOM.render(
<Goodbye name="Bloc Student"/>, document.getElementById('app')
);
</script>
</body>
</html>