-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJSX.html
More file actions
37 lines (33 loc) · 1.05 KB
/
JSX.html
File metadata and controls
37 lines (33 loc) · 1.05 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
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example</title>
</head>
<body>
<div id="root"></div>
<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel">
console.log(React);
console.log(ReactDOM)
// React.createElement의 한계를 극복
// 우리가 작성한 어떤 코드 => 순수하게 실행할 수 있는 자바스크립트로 변환하는 과정이 필요하다. => babel에 의해 진행됨
ReactDOM.render(
<div a="a">
<div>
<h1>주제</h1>
<ul>
<li>Vue</li>
<li>React</li>
</ul>
</div>
</div>,
document.querySelector("#root")
);
</script>
</body>
</html>