html
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
<!--
iam creating an html page using React, on android using a local ide(trebedit). the page uses react and babel(for transpiling the jsx code used to write for react) using cdn links, and i want to keep it that way because i do not want to setup a local server for now. the project directory structure is like this, all files in a single folder:
project_folder
-index.html
-index.js
-App.jsx
-Header.jsx
all the contents inside the files are written below.
index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My React Page</title>
</head>
<body>
<div id="root"></div>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel" src="./index.js" data-type="module"></script>
</script>
css
css
1
2
3
body {
}
js
js
1
BROWSER
Console
Run