Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,090 --> 00:00:03,330
So, let's dive right
2
00:00:03,330 --> 00:00:06,540
into this video and this topic by answering
3
00:00:06,540 --> 00:00:08,960
the most important question first.
4
00:00:08,960 --> 00:00:13,960
What exactly is React.js and why would we use it?
5
00:00:13,960 --> 00:00:15,510
Why do we need it?
6
00:00:15,510 --> 00:00:18,520
What's the problem it helps us solve?
7
00:00:18,520 --> 00:00:23,060
Regarding the what, we can, of course, visit reactjs.org,
8
00:00:23,060 --> 00:00:26,310
the official webpage of React.js.
9
00:00:26,310 --> 00:00:30,470
And there, we learn that React is a JavaScript library
10
00:00:30,470 --> 00:00:35,470
and it's a JavaScript library for building user interfaces.
11
00:00:35,620 --> 00:00:37,130
Now, that's quite straightforward.
12
00:00:37,130 --> 00:00:40,540
It's a library for the JavaScript programming language
13
00:00:40,540 --> 00:00:43,970
that helps us build user interfaces.
14
00:00:43,970 --> 00:00:46,513
But what exactly does this nice sentence mean?
15
00:00:47,350 --> 00:00:50,410
React.js is a library and, to be precise,
16
00:00:50,410 --> 00:00:52,550
it's a client-side library.
17
00:00:52,550 --> 00:00:55,220
It's about client-side JavaScript.
18
00:00:55,220 --> 00:00:57,610
So, the JavaScript code, which runs
19
00:00:57,610 --> 00:01:00,450
in the browsers of your visitors.
20
00:01:00,450 --> 00:01:04,360
And that is important because we use JavaScript
21
00:01:04,360 --> 00:01:08,810
in the browser to manipulate web pages
22
00:01:08,810 --> 00:01:11,600
after they were loaded, and that allows us
23
00:01:11,600 --> 00:01:14,630
to build rich, highly interactive,
24
00:01:14,630 --> 00:01:18,310
modern user interfaces for our websites.
25
00:01:18,310 --> 00:01:21,330
Take something like Netflix, for example,
26
00:01:21,330 --> 00:01:24,500
which is actually built with React.
27
00:01:24,500 --> 00:01:28,140
There, we can browse around, we can hover over one
28
00:01:28,140 --> 00:01:33,020
of the movies or series, and we get more details there.
29
00:01:33,020 --> 00:01:36,460
We can add it to our list, and we can go to that list page
30
00:01:36,460 --> 00:01:40,160
and everything here happens very smoothly,
31
00:01:40,160 --> 00:01:42,410
and also quickly.
32
00:01:42,410 --> 00:01:47,410
We never need to click anywhere, and load a new HTML page.
33
00:01:48,340 --> 00:01:53,170
That refresh icon, in the top left corner, never spins
34
00:01:53,170 --> 00:01:56,910
Because we never request a new HTML page,
35
00:01:56,910 --> 00:02:00,840
we never have to wait for a new HTML page
36
00:02:00,840 --> 00:02:03,540
to be generated by the server.
37
00:02:03,540 --> 00:02:07,810
And that happens because JavaScript is doing some work here
38
00:02:07,810 --> 00:02:10,539
and it's updating what we see on the screen,
39
00:02:10,539 --> 00:02:14,780
the dom, whilst we are working on that page.
40
00:02:14,780 --> 00:02:18,010
And that gives us that nice user experience,
41
00:02:18,010 --> 00:02:23,010
that nice UI, which we know from mobile apps, for example.
42
00:02:23,160 --> 00:02:25,600
When we work with a mobile app,
43
00:02:25,600 --> 00:02:29,320
we're used to things being very reactive.
44
00:02:29,320 --> 00:02:31,930
There, we can work with the app and switch
45
00:02:31,930 --> 00:02:36,150
between different screens without having that latency,
46
00:02:36,150 --> 00:02:38,270
which we know from some websites,
47
00:02:38,270 --> 00:02:42,730
without requesting new HTML pages behind the scenes.
48
00:02:42,730 --> 00:02:46,910
So, mobile apps therefore feel very reactive,
49
00:02:46,910 --> 00:02:49,730
things happen instantly, we don't need to wait
50
00:02:49,730 --> 00:02:53,990
for new pages to load, or for actions to start.
51
00:02:53,990 --> 00:02:57,960
And, traditionally, in web apps that was different.
52
00:02:57,960 --> 00:03:00,350
There, we often had to click a button
53
00:03:00,350 --> 00:03:04,750
and then wait for a new page to be loaded and to show up.
54
00:03:04,750 --> 00:03:08,070
And whilst that, of course, also does work
55
00:03:08,070 --> 00:03:12,150
it is not the same user experience our users know
56
00:03:12,150 --> 00:03:15,030
from their mobile apps, and it's often not
57
00:03:15,030 --> 00:03:18,110
the user experience we want to deliver therefore.
58
00:03:18,110 --> 00:03:21,630
Now, that's a problem we can solve with JavaScript,
59
00:03:21,630 --> 00:03:24,870
JavaScript in the browser, because that allows us
60
00:03:24,870 --> 00:03:28,490
to manipulate the dom and therefore what the user sees
61
00:03:28,490 --> 00:03:32,690
without requesting a new HTML page and waiting for it.
62
00:03:32,690 --> 00:03:36,630
And therefore, just JavaScript would be enough.
63
00:03:36,630 --> 00:03:38,720
But let me give you an example
64
00:03:38,720 --> 00:03:41,840
of just JavaScript and why we might want
65
00:03:41,840 --> 00:03:45,873
to use something like React instead of just JavaScript.
5340
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.