-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (47 loc) · 2.2 KB
/
index.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
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>React App</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<!-- pure html -->
<!-- <div id="root">
<h1>Welcome to React app</h1>
</div> -->
<!--loading the ui using js -->
<div id="root">
<!-- react will override this -->
<h1>not rendered</h1>
</div>
<!-- create a element using the normal javascript -->
<!-- <script>
const header = document.createElement("h1");
header.innerHTML = "welcome to react project";
const root = document.getElementById("root");
root.appendChild(header);
</script> -->
<!-- import the react library using react cdn -->
<!-- <script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script> -->
<!-- if we used CDN links no need to import react and react-dom -->
<!-- <script src="App.js"></script> -->
<script type="module" src="App.js"></script>
<!-- if we didn't mention type=module browser doesn't know import it will give the -->
<!-- Browser scripts cannot have imports or exports -->
</body>
</html>
<!-- BUNDLERS :vite, parcel and webpack these are the bundlers -->
<!-- Bundler will minify your code, will remove console logs and will do lot of optimizations -->
<!-- If we want to upgrade to minor version use ^ -->
<!-- If we want to upgrade to major version use ~ -->
<!-- If we want the exact version just keep the exact version -->
<!-- Node modules contains all installed packages code -->
<!-- Nodemodules are kind of database for npm -->
<!-- package.json and package-lock.json help us to generate nodemodules on our server -->
<!-- for igniting the app run npx parcel index.html here npx means execute the parcel with entry point-->
<!-- npx parcel build index.html (if we used build it will generate the production ready optimized code) -->
<!-- dist folder contains the all minified code of entire files-->
<!-- by passing the key to childs it will help to do Reconsolation -->