-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathApp.js
More file actions
48 lines (42 loc) · 1.21 KB
/
App.js
File metadata and controls
48 lines (42 loc) · 1.21 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
38
39
40
41
42
43
44
45
46
47
48
// 02 - Igniting the APP
/*
*** Parcel Feature ***
* Created A Server
* HMR - Hot Module Replacement
* File Watcher algorithm - C++
* BUNDLING
* MINIFY
* Cleaning our Code
* Dev abd Production Build
* Super Fast build algorithm
* Image Optimization
* Caching while development
* Compression
* Compatible with older version of browser
* HTTPS on dev
* port Number
* Consistent Hashing Algorithm
* Zero Config
* Tree shaking
*
*
* Transitive Dependencies
* BrowserList
*
* npx parcel index.html
* npx parcel build index.html
*/
import React from "react"
// import ReactDOM from "react-dom"
import ReactDOM from "react-dom/client"
const heading = React.createElement("h1", { className: "h1", key: "#1" }, "Welcome Everyone")
const para = React.createElement("p", { className: "para", key: "#2" }, "This is React App.")
const container = React.createElement("div", { className: "wrapper" }, [heading, para])
// console.log("React: ", React)
// console.log("ReactDOM: ", ReactDOM)
// console.log("heading: ", heading)
// console.log("paragraph: ", para)
// console.log("container: ", container)
const root = ReactDOM.createRoot(document.getElementById("root"))
// console.log("root: ", root)
root.render(container)