-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
46 lines (44 loc) · 883 Bytes
/
app.js
File metadata and controls
46 lines (44 loc) · 883 Bytes
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
const root = ReactDOM.createRoot(document.getElementById('root'));
// React.createElement(type, [props], [...children]);
const title = React.createElement(
'h1',
{
title: 'Hello World',
className: 'Heading',
style: {
color: 'red',
},
},
'Hello World',
);
const ul = React.createElement(
'ul',
{
id: 'ul-id',
style: {
color: 'red',
},
},
React.createElement(
'li',
{
id: '1',
},
'Clean room',
),
);
const div = React.createElement(
'div',
{
className: 'post-item',
},
React.createElement(
'h2',
{
title: 'Học react',
},
'Học ReactJS',
),
React.createElement('p', null, 'Học ReactJS từ cơ bản đến nâng cao'),
);
root.render(title);