All language subtitles for 008 Class-based vs Functional Components_ A Summary_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Now that's it for this introduction

to class-based components.

I showed you that they exist, how they work

and how you write your own ones,

how you work with prompts and the render method,

how you work with state, and also how you work

with these life cycle methods for side effects

and we also had a look at how you use context.

You can build your entire application

with class-based components if you want to.

That is absolutely fine.

And in the past, as I mentioned, you had to use them

in some cases.

But in modern React apps, you typically

stick to functional components instead,

simply because they are leaner and more flexible,

as you learned throughout this module.

That's why I also started with functional components

in this course now, because the React Echo system

transitioned to functional components as the main thing

and that's why I focus on functional components

in this course.

Also, going forward, for the rest of this course,

functional components will be the focus

and I will only occasionally show you

how to work with class-based components.

Nonetheless, I wanna emphasize that you don't have to use

functional components, it is fine to use class-based ones

if you prefer them,

but chances are that you also see the benefits

of functional components, and therefore it is fine

to generally ignore class-based components.

With one exception, to which I'll come back to

in a couple of minutes.

Now if you're not sure which approach to use,

if you're not sure whether you wanna go with class-based

or functional components, here's a little

helper decision tree, if you wanna call it like that.

As a general rule, you should simply prefer

functional components and you should instead

use class-based components if you personally prefer them

so if you disagree, if you like them,

of course you can use them, there's nothing wrong with them.

If you are working on a project or if you're in a team

where there are a lot of class-based components being used,

you might not have a choice then and you might be

confusing your colleagues if you start working

with functional components only,

and you also should use, and you must use,

class-based components if you're building error boundaries.

Now, that's something we haven't learned yet,

but that's exactly what we're going to take a look at

in the next lecture now.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.