Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,100 --> 00:00:05,533
Maximilian: Remember, this section was about components.
2
00:00:05,533 --> 00:00:09,300
It was about understanding the most important concept
3
00:00:09,300 --> 00:00:12,866
of React that you build user interfaces
4
00:00:12,866 --> 00:00:17,066
by building and combining components.
5
00:00:17,066 --> 00:00:18,400
And for that, we had a look
6
00:00:18,400 --> 00:00:22,500
at the React Core Syntax and JSX.
7
00:00:22,500 --> 00:00:22,733
at the React Core Syntax and JSX.
8
00:00:22,733 --> 00:00:24,933
We, of course, had a very detailed look
9
00:00:24,933 --> 00:00:28,900
at building and using and working with components and props.
10
00:00:28,900 --> 00:00:32,633
And that already leads to the last part, data.
11
00:00:32,633 --> 00:00:32,833
And that already leads to the last part, data.
12
00:00:32,833 --> 00:00:36,033
We learned how to share data across components
13
00:00:36,033 --> 00:00:39,066
through that props concept.
14
00:00:39,066 --> 00:00:43,133
Now, maybe you already noticed one important thing,
15
00:00:43,133 --> 00:00:46,466
with all these components, which we are building,
16
00:00:46,466 --> 00:00:49,300
in the end we're just splitting up our code
17
00:00:49,300 --> 00:00:52,866
across multiple files and building blocks
18
00:00:52,866 --> 00:00:53,133
across multiple files and building blocks
19
00:00:53,133 --> 00:00:56,533
so that if we want to have more than one expense item,
20
00:00:56,533 --> 00:00:59,966
we can just use our custom ExpenseItem component
21
00:00:59,966 --> 00:01:01,700
multiple times instead of repeating all
22
00:01:01,700 --> 00:01:03,200
multiple times instead of repeating all
23
00:01:03,200 --> 00:01:06,200
that code multiple times, that's the idea behind components.
24
00:01:06,200 --> 00:01:08,866
that code multiple times, that's the idea behind components.
25
00:01:08,866 --> 00:01:12,433
In the end, what ends up on the screen
26
00:01:12,433 --> 00:01:16,533
are just default HTML elements, though.
27
00:01:16,533 --> 00:01:16,833
are just default HTML elements, though.
28
00:01:16,833 --> 00:01:21,166
If you inspect your page with the developer tools, here,
29
00:01:21,166 --> 00:01:24,666
in the Chrome developer tools with the Elements tab,
30
00:01:24,666 --> 00:01:26,500
you will notice that you don't see
31
00:01:26,500 --> 00:01:30,333
your custom components here, there is no card
32
00:01:30,333 --> 00:01:33,733
or ExpenseItem component, you just see divs
33
00:01:33,733 --> 00:01:36,900
and H2 elements, and so on.
34
00:01:36,900 --> 00:01:42,333
And that is how the web works and how React works.
35
00:01:42,333 --> 00:01:47,433
These custom components are not really HTML elements,
36
00:01:47,433 --> 00:01:51,200
which end up on the screen, you just use them in your code
37
00:01:51,200 --> 00:01:54,666
in your React code, in your JSX code.
38
00:01:54,666 --> 00:01:54,833
in your React code, in your JSX code.
39
00:01:54,833 --> 00:01:59,066
What ends up on the screen are just the HTML elements
40
00:01:59,066 --> 00:02:02,733
because, ultimately, every custom component you build
41
00:02:02,733 --> 00:02:06,766
either uses these built in HTML elements
42
00:02:06,766 --> 00:02:09,933
or it uses another of component which, at some point,
43
00:02:09,933 --> 00:02:13,266
if you drill into your components deeply enough
44
00:02:13,266 --> 00:02:17,000
will end up using these built in elements.
45
00:02:17,000 --> 00:02:18,833
And that's an important takeaway,
46
00:02:18,833 --> 00:02:22,166
and something important to keep in mind.
47
00:02:22,166 --> 00:02:25,333
Now, the application we built thus far is great
48
00:02:25,333 --> 00:02:27,300
because we had the chance of learning
49
00:02:27,300 --> 00:02:30,033
about components and props with it.
50
00:02:30,033 --> 00:02:30,066
about components and props with it.
51
00:02:30,066 --> 00:02:33,233
And these are two of the most important concepts
52
00:02:33,233 --> 00:02:35,400
you got to know when working with React.
53
00:02:35,400 --> 00:02:38,133
I'm not sure if I mentioned it already.
54
00:02:38,133 --> 00:02:40,566
But, of course, this application as we built
55
00:02:40,566 --> 00:02:43,666
it thus far also has a downside.
56
00:02:43,666 --> 00:02:46,733
In the end, it's still static.
57
00:02:46,733 --> 00:02:46,833
In the end, it's still static.
58
00:02:46,833 --> 00:02:50,366
Yes, we have reusable components, which can be configured
59
00:02:50,366 --> 00:02:54,366
with props but, ultimately, we have this expenses array
60
00:02:54,366 --> 00:02:58,600
in the App.js file and the this array never changes.
61
00:02:58,600 --> 00:02:58,800
in the App.js file and the this array never changes.
62
00:02:58,800 --> 00:03:01,366
The data here is set in stone.
63
00:03:01,366 --> 00:03:04,866
It's still a static application in the end.
64
00:03:04,866 --> 00:03:07,800
Nothing is changing here, as a user,
65
00:03:07,800 --> 00:03:12,066
we have no chance of interacting with this application.
66
00:03:12,066 --> 00:03:14,333
And that's therefore what we're going
67
00:03:14,333 --> 00:03:17,366
to change in the next course section
68
00:03:17,366 --> 00:03:19,533
when we're going to bring this to life.
69
00:03:19,533 --> 00:03:20,900
And when we're going to learn
70
00:03:20,900 --> 00:03:24,300
about another concept called state.
71
00:03:24,300 --> 00:03:28,300
Now, before we go there though, I just got three
72
00:03:28,300 --> 00:03:30,700
other things, which I want to cover here.
73
00:03:30,700 --> 00:03:30,866
other things, which I want to cover here.
74
00:03:30,866 --> 00:03:35,400
The first thing, the first concept is JSX.
75
00:03:35,400 --> 00:03:35,566
The first thing, the first concept is JSX.
76
00:03:35,566 --> 00:03:38,300
I mentioned that we'll take a closer look at that
77
00:03:38,300 --> 00:03:40,533
and we're going to do that in the next lecture.
78
00:03:40,533 --> 00:03:40,800
and we're going to do that in the next lecture.
79
00:03:40,800 --> 00:03:43,400
You could skip that lecture but, at some point,
80
00:03:43,400 --> 00:03:46,266
you should have a look at it so that you understand
81
00:03:46,266 --> 00:03:50,066
what JSX really is under the hood and how it works.
82
00:03:50,066 --> 00:03:52,033
So I recommend that you don't skip it,
83
00:03:52,033 --> 00:03:55,566
even though you could do that, if you're in a hurry.
84
00:03:55,566 --> 00:03:57,800
Now, the other two things I want to have a look at
85
00:03:57,800 --> 00:04:00,500
is how we organize our files,
86
00:04:00,500 --> 00:04:03,766
and how we write our functions here.
87
00:04:03,766 --> 00:04:06,200
And, therefore, let's dive into these concepts
88
00:04:06,200 --> 00:04:07,866
before we finish this module,
89
00:04:07,866 --> 00:04:10,633
and move on to the next course section.
7296
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.