🧱
CC10045 min
Day 17
Components - Building Blocks
Time to build some reusable pieces!
Today's Lesson
Components are reusable pieces of UI - like LEGO blocks. Build a header once, use it everywhere. Change it in one place, it updates everywhere. This is the core of modern web development.
Today's Tasks
- 1Create a Header component with your name and navigation
- 2Create a Footer component with copyright
- 3Add both to your layout so they appear on every page
Prompt to Use
Create a Header component with my name and navigation links (Home, About, Contact). Create a Footer component with copyright info. Add both to the layout so they appear on every page. Use Tailwind for styling.
Expected Outcome
Header and Footer components appearing on every page.
New Terms
- Component
- Layout
- Reusable
- Props
Pro Tip
If you're copying and pasting the same HTML, it should probably be a component.
Coming Tomorrow
We'll make it look good with Tailwind CSS.
P.S. Components changed web development forever. Now you understand why.
Your Study Progress
16%
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Day 17 of 100
Today's Tasks
0/3