Skip to content

Commit 3bb05ef

Browse files
Add react starting code
0 parents  commit 3bb05ef

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

3-starting-code/react-basics.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>React Basics</title>
5+
</head>
6+
<body>
7+
<div class="js-container"></div>
8+
9+
<!-- Load the React external library. -->
10+
<script src="https://unpkg.com/supersimpledev/react.js"></script>
11+
<script src="https://unpkg.com/supersimpledev/react-dom.js"></script>
12+
13+
<!-- Load the babel external library -->
14+
<script src="https://unpkg.com/supersimpledev/babel.js"></script>
15+
16+
<script type="text/babel">
17+
// This code starts React.
18+
const container = document.querySelector('.js-container');
19+
ReactDOM.createRoot(container).render();
20+
</script>
21+
</body>
22+
</html>

0 commit comments

Comments
 (0)