WEBVTT

00:00:00.000 --> 00:00:04.440
Since I have all these courses on React,

00:00:04.720 --> 00:00:08.520
Angular, Vue, and so on, I do sometimes

00:00:08.520 --> 00:00:10.720
get the question whether you should

00:00:10.720 --> 00:00:14.980
learn JavaScript first before picking up

00:00:14.980 --> 00:00:18.180
one of those popular libraries or

00:00:18.180 --> 00:00:18.780
frameworks.

00:00:19.860 --> 00:00:23.560
And I think the answer is not a clear yes

00:00:23.560 --> 00:00:27.580
or no, but I do definitely not agree with

00:00:27.580 --> 00:00:31.060
people who almost preach that you

00:00:31.060 --> 00:00:34.400
must learn all the basics first, that you

00:00:34.400 --> 00:00:38.260
must learn vanilla JavaScript first before

00:00:38.260 --> 00:00:41.600
you dive into one of those frameworks or

00:00:41.600 --> 00:00:42.140
libraries.

00:00:42.640 --> 00:00:46.300
But at the same time, I also don't think

00:00:46.300 --> 00:00:49.120
that you should skip vanilla JavaScript.

00:00:49.700 --> 00:00:50.800
And here's what I mean.

00:00:51.600 --> 00:00:54.240
When you start learning web

00:00:54.240 --> 00:00:55.940
development, when you start your

00:00:55.940 --> 00:00:59.120
journey as a web developer, you will, of

00:00:59.120 --> 00:01:02.760
course, at some point, probably relatively

00:01:02.760 --> 00:01:06.540
early, come into contact with JavaScript

00:01:06.540 --> 00:01:10.600
because you need JavaScript to add

00:01:10.600 --> 00:01:13.060
some interactivity to your website.

00:01:13.179 --> 00:01:16.960
Now, as a side note, you can nowadays

00:01:16.960 --> 00:01:20.460
actually add quite a bit of interactivity to

00:01:20.460 --> 00:01:24.540
your website and, for example, open a

00:01:24.540 --> 00:01:26.960
modal without using JavaScript.

00:01:27.540 --> 00:01:29.700
And that might be worth a separate

00:01:29.700 --> 00:01:30.200
episode.

00:01:30.720 --> 00:01:34.060
But still, it is quite common to use

00:01:34.060 --> 00:01:37.300
client-side JavaScript for many

00:01:37.300 --> 00:01:39.980
interactive features you might want to

00:01:39.980 --> 00:01:40.860
add to your website.

00:01:41.040 --> 00:01:43.680
And there still are certain use cases

00:01:43.680 --> 00:01:45.800
where you need JavaScript.

00:01:46.180 --> 00:01:48.920
So as you're becoming a web developer,

00:01:49.200 --> 00:01:53.260
you will naturally, pretty early on, get in

00:01:53.260 --> 00:01:55.880
touch with JavaScript, so to say.

00:01:56.360 --> 00:01:58.820
Now, you will also, depending on how

00:01:58.820 --> 00:02:01.100
much research you do and if you're

00:02:01.100 --> 00:02:03.020
taking an online course or not and

00:02:03.020 --> 00:02:06.060
which course you're taking, you will also

00:02:06.060 --> 00:02:10.660
likely relatively soon find out that there

00:02:10.660 --> 00:02:14.580
are certain libraries or frameworks that

00:02:14.580 --> 00:02:17.240
can make your life easier as you're

00:02:17.240 --> 00:02:19.680
working on your website and as you're

00:02:19.680 --> 00:02:21.040
using JavaScript there.

00:02:21.440 --> 00:02:25.260
In the past, that has been jQuery, for

00:02:25.260 --> 00:02:25.780
example.

00:02:26.140 --> 00:02:30.320
And just as a little fun fact, jQuery is still

00:02:30.400 --> 00:02:33.280
super popular, even though it's not in

00:02:33.280 --> 00:02:36.180
the tech Twitter bubble, but it is in

00:02:36.180 --> 00:02:38.280
general still being used on a lot of

00:02:38.280 --> 00:02:38.720
websites.

00:02:39.560 --> 00:02:43.620
But nowadays, most courses and

00:02:43.620 --> 00:02:46.980
tutorials guide you towards other

00:02:46.980 --> 00:02:49.380
frameworks and libraries for a reason,

00:02:49.640 --> 00:02:51.880
because those frameworks and libraries

00:02:51.880 --> 00:02:55.840
like React or Angular or Vue or HTMX

00:02:55.840 --> 00:02:59.600
and others solve certain problems in a

00:02:59.600 --> 00:03:03.140
more elegant way than jQuery did and

00:03:03.140 --> 00:03:07.420
do allow you to focus on your core

00:03:07.420 --> 00:03:09.400
business logic, the core problem you

00:03:09.400 --> 00:03:12.120
want to solve, and not having to worry

00:03:12.120 --> 00:03:14.780
about reaching out to individual

00:03:14.780 --> 00:03:17.200
elements on the page and manipulating

00:03:17.280 --> 00:03:18.660
them with JavaScript.

00:03:19.080 --> 00:03:22.740
So it makes sense to learn about one of

00:03:22.740 --> 00:03:25.280
those libraries or frameworks at some

00:03:25.280 --> 00:03:27.940
point, unless you absolutely don't want

00:03:27.940 --> 00:03:29.700
to do anything front-end web

00:03:29.700 --> 00:03:31.860
development related and you only want

00:03:31.860 --> 00:03:33.620
to focus on the back-end, which is fine

00:03:33.620 --> 00:03:33.920
too.

00:03:34.240 --> 00:03:36.560
But if that's not the case, you will, of

00:03:36.560 --> 00:03:39.280
course, pick up one of those libraries or

00:03:39.280 --> 00:03:41.280
frameworks at some point, most likely.

00:03:41.600 --> 00:03:44.680
And the question now just is, should you

00:03:44.680 --> 00:03:49.840
dive deeply into vanilla JavaScript, as it's

00:03:49.840 --> 00:03:53.620
called, so into JavaScript that's not using

00:03:53.620 --> 00:03:57.300
any library, before you then learn React

00:03:57.300 --> 00:03:58.280
or Angular?

00:03:58.920 --> 00:04:01.980
And here, my opinion is that you should

00:04:01.980 --> 00:04:05.920
not dive deeply into vanilla JavaScript

00:04:05.920 --> 00:04:10.240
before learning React or Angular or Vue

00:04:10.240 --> 00:04:10.780
or whatever.

00:04:11.800 --> 00:04:14.040
And that does not mean that you should

00:04:14.040 --> 00:04:15.440
not learn it at all.

00:04:15.940 --> 00:04:19.220
You should just not dive super deep into

00:04:19.220 --> 00:04:19.440
it.

00:04:20.040 --> 00:04:21.079
And here's why.

00:04:21.660 --> 00:04:24.080
Of course, you need to learn the very

00:04:24.080 --> 00:04:24.660
basics.

00:04:24.860 --> 00:04:27.060
You need to learn how JavaScript

00:04:27.060 --> 00:04:28.620
generally works.

00:04:28.920 --> 00:04:31.440
You need to learn what variables are and

00:04:31.440 --> 00:04:34.880
functions, which core data types you

00:04:34.880 --> 00:04:37.780
have in there, like numbers, strings,

00:04:38.480 --> 00:04:41.100
objects, arrays, and so on.

00:04:41.420 --> 00:04:44.200
You need all these things because you're

00:04:44.200 --> 00:04:47.360
going to use all these language features,

00:04:47.580 --> 00:04:50.500
no matter which library or framework

00:04:50.500 --> 00:04:52.140
you're going to work with.

00:04:52.340 --> 00:04:55.280
So you absolutely need that foundation.

00:04:55.980 --> 00:04:59.620
But I, for example, don't think that you

00:04:59.620 --> 00:05:02.580
need a deep understanding of how you

00:05:02.580 --> 00:05:05.220
can manipulate the DOM, for example.

00:05:05.620 --> 00:05:08.680
You should know that the DOM exists

00:05:08.680 --> 00:05:10.400
and what the DOM is.

00:05:10.500 --> 00:05:11.380
You should know that.

00:05:11.760 --> 00:05:13.520
But you don't need a deep

00:05:13.520 --> 00:05:16.840
understanding of how to manipulate the

00:05:16.840 --> 00:05:18.900
DOM with vanilla JavaScript.

00:05:19.580 --> 00:05:22.740
And in my opinion, you also don't need a

00:05:22.740 --> 00:05:25.640
deep understanding of advanced

00:05:25.640 --> 00:05:29.360
language patterns, niche features, which

00:05:29.360 --> 00:05:32.480
might not matter for the library you're

00:05:32.480 --> 00:05:33.340
working with.

00:05:33.560 --> 00:05:36.460
For example, if you are working with

00:05:36.460 --> 00:05:38.740
React, if you want to learn React, you

00:05:38.740 --> 00:05:41.940
don't really need to understand what

00:05:41.940 --> 00:05:46.520
classes are in JavaScript to get started

00:05:46.520 --> 00:05:48.800
with React, because modern React

00:05:48.800 --> 00:05:51.720
doesn't really use classes anymore.

00:05:52.380 --> 00:05:54.540
Now, I can already hear some people

00:05:54.540 --> 00:05:56.760
saying, yeah, well, you're going to write

00:05:56.760 --> 00:05:59.800
bad React code if you don't know

00:05:59.800 --> 00:06:01.740
advanced JavaScript features.

00:06:01.980 --> 00:06:03.920
If you don't know about closures, for

00:06:03.920 --> 00:06:06.860
example, you will at some point certainly

00:06:06.960 --> 00:06:09.580
introduce bugs in your React code.

00:06:10.360 --> 00:06:11.600
And you would be right.

00:06:12.020 --> 00:06:15.120
You should absolutely become better at

00:06:15.120 --> 00:06:17.320
JavaScript and learn more about it.

00:06:17.720 --> 00:06:22.200
But my point is that becoming better at

00:06:22.200 --> 00:06:24.880
JavaScript is something you'll

00:06:24.880 --> 00:06:28.040
automatically do as you work on React

00:06:28.040 --> 00:06:30.080
apps and as you're learning React.

00:06:30.420 --> 00:06:33.280
I'm not saying that you should learn the

00:06:33.280 --> 00:06:37.140
basics of JavaScript, then pick up some

00:06:37.140 --> 00:06:41.920
basics of React and feel like you're done.

00:06:42.120 --> 00:06:43.420
No, that's not the case.

00:06:43.780 --> 00:06:46.680
But I am saying that it will probably be

00:06:46.680 --> 00:06:50.820
more fun to learn JavaScript and dive

00:06:50.820 --> 00:06:54.200
deeper into JavaScript if you're doing it

00:06:54.200 --> 00:06:57.680
along the way whilst also learning React

00:06:57.680 --> 00:07:02.040
and therefore building web applications

00:07:02.040 --> 00:07:04.640
and user interfaces that are probably

00:07:04.640 --> 00:07:05.420
more fun.

00:07:05.700 --> 00:07:07.880
Because let's be honest, if you're

00:07:07.880 --> 00:07:10.560
working with just vanilla JavaScript,

00:07:11.380 --> 00:07:14.340
you're kind of limited regarding the

00:07:14.340 --> 00:07:17.720
complexity of the web applications and

00:07:17.720 --> 00:07:20.080
user interfaces you can build with that.

00:07:20.820 --> 00:07:23.280
Sure, theoretically, you can build

00:07:23.280 --> 00:07:23.900
anything.

00:07:24.380 --> 00:07:26.900
But of course, those libraries and

00:07:26.900 --> 00:07:29.560
frameworks like React exist for a reason.

00:07:29.880 --> 00:07:32.560
They make it easier to build complex

00:07:32.560 --> 00:07:34.580
web applications and websites.

00:07:35.340 --> 00:07:37.660
And I do believe that you will have a

00:07:37.660 --> 00:07:39.100
better time and you'll be more

00:07:39.100 --> 00:07:42.660
motivated to learn JavaScript and of

00:07:42.660 --> 00:07:45.280
course also learn more advanced and

00:07:45.280 --> 00:07:48.380
niche features at some point if you're

00:07:48.380 --> 00:07:51.560
learning it side by side with React, for

00:07:51.560 --> 00:07:52.040
example.

00:07:52.660 --> 00:07:54.640
Now, you could of course say that the

00:07:54.640 --> 00:07:57.160
danger is that you don't really know

00:07:57.160 --> 00:08:02.060
which part is React and which part is

00:08:02.060 --> 00:08:03.280
vanilla JavaScript.

00:08:04.360 --> 00:08:06.760
But for example, especially when

00:08:06.760 --> 00:08:09.100
working with React, that danger

00:08:09.100 --> 00:08:12.040
probably isn't too high because React

00:08:12.040 --> 00:08:15.460
doesn't have that many React-specific

00:08:15.460 --> 00:08:16.180
features.

00:08:16.800 --> 00:08:20.380
Sure, it has JSX, which technically is not

00:08:20.380 --> 00:08:23.040
React-specific, but it's not part of vanilla

00:08:23.040 --> 00:08:23.560
JavaScript.

00:08:24.120 --> 00:08:27.080
It also has the idea of building custom

00:08:27.080 --> 00:08:30.220
components, custom HTML elements,

00:08:30.340 --> 00:08:32.559
you could say, by defining functions.

00:08:33.179 --> 00:08:35.039
It has the concept of outputting

00:08:35.039 --> 00:08:37.200
dynamic content between curly braces.

00:08:37.720 --> 00:08:40.580
And none of these things will work with

00:08:40.580 --> 00:08:43.700
vanilla JavaScript, but you will learn that

00:08:43.700 --> 00:08:46.320
at some point when working with React.

00:08:47.040 --> 00:08:49.300
Chances are high that you're following

00:08:49.300 --> 00:08:51.780
along with some guide or some course

00:08:51.780 --> 00:08:54.300
that simply tells you that a certain

00:08:54.300 --> 00:08:55.720
feature is React-specific.

00:08:56.320 --> 00:08:58.240
And even if that's not the case, you will

00:08:58.240 --> 00:09:01.880
find out if you start trying to use some

00:09:01.880 --> 00:09:04.980
feature you thought to be vanilla

00:09:04.980 --> 00:09:07.940
JavaScript in vanilla JavaScript and it

00:09:07.940 --> 00:09:08.800
doesn't work.

00:09:09.760 --> 00:09:11.800
And the same is true if you would pick

00:09:11.800 --> 00:09:13.920
Angular or Vue, for example.

00:09:14.560 --> 00:09:17.720
Those frameworks have some extra

00:09:17.720 --> 00:09:20.640
features, a bit more features, than React,

00:09:20.940 --> 00:09:24.220
in my opinion, that are non-vanilla

00:09:24.220 --> 00:09:26.260
JavaScript-like, but it's the same thing

00:09:26.260 --> 00:09:26.600
there.

00:09:27.040 --> 00:09:29.780
You will find out that something's not

00:09:29.780 --> 00:09:31.040
vanilla JavaScript.

00:09:31.580 --> 00:09:32.820
You will find out.

00:09:32.920 --> 00:09:34.760
And you could make the opposite case

00:09:34.760 --> 00:09:35.220
as well.

00:09:35.440 --> 00:09:39.180
If you become a JavaScript expert before

00:09:39.180 --> 00:09:41.900
picking up React or Angular or whatever,

00:09:42.660 --> 00:09:44.640
there also could be a danger of

00:09:44.640 --> 00:09:47.540
transferring some patterns and concepts

00:09:47.540 --> 00:09:50.260
you know from vanilla JavaScript to

00:09:50.260 --> 00:09:51.800
those frameworks and libraries.

00:09:52.280 --> 00:09:54.860
You could, for example, be inclined to

00:09:54.860 --> 00:09:58.040
reach out to the DOM manually through

00:09:58.040 --> 00:10:00.700
vanilla JavaScript code and manipulate

00:10:00.700 --> 00:10:01.940
it at some point.

00:10:02.160 --> 00:10:04.120
And that would be something you

00:10:04.120 --> 00:10:06.520
typically shouldn't do when using one of

00:10:06.520 --> 00:10:07.200
those libraries.

00:10:07.640 --> 00:10:10.780
So I don't think that's necessarily a big

00:10:10.780 --> 00:10:11.260
problem.

00:10:11.640 --> 00:10:14.920
You will automatically learn what is

00:10:14.920 --> 00:10:16.960
vanilla JavaScript and what is

00:10:16.960 --> 00:10:19.100
library-specific at some point.

00:10:19.680 --> 00:10:22.420
Because the idea, of course, always is

00:10:22.420 --> 00:10:24.320
that you don't stop learning.

00:10:24.760 --> 00:10:27.480
As a web developer, or I guess as a

00:10:27.480 --> 00:10:29.420
human in general, we never do.

00:10:29.640 --> 00:10:31.100
There's always more to learn.

00:10:31.220 --> 00:10:33.020
There's always more to become better

00:10:33.020 --> 00:10:33.280
at.

00:10:33.760 --> 00:10:37.040
But I do believe that many people will

00:10:37.040 --> 00:10:39.740
have a better time becoming a web

00:10:39.740 --> 00:10:41.840
developer and learning front-end web

00:10:41.840 --> 00:10:44.100
development if they learn it whilst

00:10:44.100 --> 00:10:46.380
building something fun and whilst

00:10:46.380 --> 00:10:48.960
building something at least a bit more

00:10:48.960 --> 00:10:49.680
realistic.

00:10:50.520 --> 00:10:52.880
And in my opinion, that's the case if you

00:10:52.880 --> 00:10:55.580
pick up a library or a framework early.