All language subtitles for 018 React Context Limitations_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
fa Persian Download
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

[Maximilian Schwarzm�ller] So React Context is great.

Let's use it for everything.

Well, not quite.

For one, keep in mind what I mentioned earlier.

It can be great for app-wide or component-wide state.

So essentially states that affects multiple components.

It's not a replacement for component configuration.

Consider our button here in the UI folder.

The button should be reusable.

Sure, we could use Context to make sure that upon a click

we always logged the user out,

but that would mean that we can't use the button

for anything else than logging users out.

And that might not be what you want.

For example, in this application,

we are using the same button component

in the log in component to log the user in

and triggered the form submission

as well as we're using it in the home component

to log the user out.

So that is a scenario where using Context

in the button component would be bad.

You wanna use props here to configure the button.

So props for configuration, context for state management

across components or possibly across the entire app.

But even then we have limitations,

React Context is specifically not optimized

for high frequency changes.

So that means, for example, if you have state changes

every second or multiple times per second,

this is clearly not the case in our example here

for authentication.

That does not change that often,

it changes once every few minutes in reality,

maybe not even that.

So that is a perfect use case for Context.

But if you had state changes

that happen much more frequently,

again, talking about multiple changes per second and so on,

then React Context is not optimized for that

and you don't have to take this for me.

This is actually something that was stated

by the official React team member.

So it's not great for high-frequency changes.

Now, you might wonder, "Okay, but what if I have app-wide

"or a component-wide state that changes often?"

I would want to use Context for that.

Props might not be ideal,

and you're telling me that it's bad.

We'll explore a better tool for that later.

No worries.

It will be called Redux and I'll have a whole section on it.

And as I mentioned, it should not be used

to replace all component communications on props.

Props are still vital and important

for component configuration.

So you should still use props for that

and not use Context for everything.

For replacing long prop chains

it might however be worth the look.

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