-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
31 lines (31 loc) · 1.01 KB
/
index.html
File metadata and controls
31 lines (31 loc) · 1.01 KB
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
<!DOCTYPE html>
<html>
<body>
<div id = "root"></div>
</body>
<script src="http://unpkg.com/react@17.0.2/umd/react.production.min.js"></script>
<script src="http://unpkg.com/react-dom@17.0.2/umd/react-dom.production.min.js"></script>
<script src="http://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel">
const root = document.getElementById("root");
const Title = () => (
<h3 id ="title" onMouseEnter={() =>console.log("mouse enter")}>
Hello I'm a title
</h3>
);
const Button = () => <button
style={{
backgroundColor : "pink",
}}
onClick = {() => console.log("im clicked")}
>
Click me
</button>
const Container = (
<div>
<Title />
<Button />
</div>);
ReactDOM.render(Container, root);
</script>
</html>