Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Well, one huge downside is this comment here by our REACT team member.
The statement here is clear, the context is great for low frequency updates, but not for high frequency
ones.
That means if you have something which changes really, let's say the user authentication status, which
is the example I used to do, react hooks module, that is fine to be covered with the context API because
this will not change all the time.
Not that often.
The same would be the case if you have something like theming on a page.
Also something which doesn't change all the time for a favorite status like this, you could already
argue that it's quite a high frequency update.
Now, obviously, users might not be tapping these buttons every second, but still switching to favorite
status of something will very likely occur way more often than logging in or changing the theme of a
page.
And therefore, I would argue that this is more on the high frequency side, just like maybe managing
a shopping cart, basically anything which changes rather often.
The context API, of course, works in that case.
But regarding the performance, it's simply not optimized for that.
The way to react context API works is such that whenever something changes in your context, it has
no way of cleverly figuring out which component that uses this context really is concerned and which
component is not.
Which means that every component that uses you as context will rebuild, will render when you switch
something in that context, no matter if it's directly affected or not.
And in general, the context API is simply not optimized and not meant to be your global state management
tool in your app.
It's meant for some state like authentication status, like the theme, but not for all your state because
of these missing optimizations and also dismissing intent behind the context API.
Hence, it is great for some things like authentication, which I mentioned a couple of times, but
not for all use cases, not for all scenarios and something like your products.
And the favorite status is probably not what you want to manage with the context API in larger projects.
But there still is a nonreaders alternative for debt and that's what we'll have a look at next.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.