-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
42 lines (31 loc) · 981 Bytes
/
app.js
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
// created a server
// Hot module replacement - HMR
// file watchers algo in c++
// bundling
// minify
// cleaning our code
// dev and prod build
// super fast build algorithm
// image optimization
// caching while development
// file compressions
// compatible with older version of browsers
// https on dev - npx parcel index.html --https
// manage port number of many projects
// consistent hashing algorithm to cache things up
// zero configuration
// transitive dependencies - all the sub dependency of different packages in package.json file
//
import React from 'react';
import ReactDOM from "react-dom/client";
const heading = React.createElement("h1", {
id: "title"
}, "Heading 1 from parcel");
const heading2 = React.createElement("h1", {
id: "title"
}, "heading 2");
const container = React.createElement("div", {
id: "container"
}, [heading, heading2])
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(container);