All language subtitles for 040 General Rules of Hooks.en_US

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
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
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

And before we cover more complicated use state examples, let me just cover some things that relate

to all hooks.

So this will also relate to all the other hooks we'll learn later.

And first, we need to remember that as far as hooks, they will start with this use, whether that

is use, in fact, you state use callback use memo or whatever.

So you'll always see this use and that also applies to whatever hooks will create ourselves later on.

We must use this use in the beginning of the components where we invoke those hooks must be the uppercase.

So let me show you the example.

If, for example, I'll change this to a state basics and this is going to be with lowercase, you'll

see a big fat error.

So in order to use hook where there are, as you state, use a fact or whatever, the component needs

to be uppercase.

That is a small gotcher, but a small gotcher that can catch up with you and very random times.

Now also the hook needs to be in the function or component body.

For example, if you move this outside, it's not going to work again.

There's going to be a big fat error because you need to invoke the hook again with the writers, use

state or whichever hook you would want.

It needs to be invoked in the function body.

And then the last thing is something that will take a look at later, and that is that we cannot call

the hook conditionally.

And I'll show you that would use the fact because it's just going to make a little bit more sense.

Now, keep in mind, I'm not talking about the function that we're getting back from the default, because,

of course, in this case, yes, we're calling this conditionally where I'm checking the state value.

And when I'm saying, all right, so if the state is equal to a random title, then I'll invoke my handler

function.

Keep that in mind.

I'm not talking about this function.

Yes, this function you can call conditionally.

However, what I'm talking about is the fact that I cannot just say if I'm in some kind of hook inside

that is not going to work.

And it's going to be easier for me to share with you the fact because there's going to be a proper example.

Again, this applies to all the custom hooks.

We're going to create ourselves, as well as all the hooks that you can use from react, whether or

not use the fact use callback, you state or all the other hooks.

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