All language subtitles for 016 Understanding Getters_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 Download
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
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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,090 --> 00:00:06,630 In the previous lecture, we learned about mutations there a way to change a state property inside the 2 00:00:06,630 --> 00:00:07,290 store. 3 00:00:07,320 --> 00:00:11,850 Just like you can create mutations, you can create something called getters. 4 00:00:11,880 --> 00:00:14,190 Getters are exactly what they sound like. 5 00:00:14,190 --> 00:00:17,970 They allow you to access a state property from the store. 6 00:00:18,270 --> 00:00:20,100 Using a getter is optional. 7 00:00:20,100 --> 00:00:24,180 We can access the state property directly through the store object. 8 00:00:24,180 --> 00:00:27,500 The store object is injected into every component. 9 00:00:27,510 --> 00:00:30,480 Here's an example of how you would access the state. 10 00:00:30,480 --> 00:00:34,020 This is one way of grabbing a state property from the store. 11 00:00:34,050 --> 00:00:39,030 Peneha offers another solution for retrieving a state property called Getters. 12 00:00:39,030 --> 00:00:42,960 The main benefit of using a getter is the support for caching. 13 00:00:43,230 --> 00:00:47,070 It can intelligently update itself when the state changes. 14 00:00:47,220 --> 00:00:51,810 We've learned that the computed properties are one way to cache a value. 15 00:00:51,840 --> 00:00:57,870 One solution might be to write a computed property for every state property we'd like to use in a given 16 00:00:57,870 --> 00:00:59,730 component that would work. 17 00:00:59,730 --> 00:01:02,310 But then we would face duplication issues. 18 00:01:02,310 --> 00:01:06,420 We'd have to define the same computed properties in every component. 19 00:01:06,720 --> 00:01:08,370 That's where getters come in. 20 00:01:08,370 --> 00:01:12,030 You can think of getters as computed properties for your store. 21 00:01:12,030 --> 00:01:16,590 One of the main benefits of a getter is that they're accessible to all components. 22 00:01:16,590 --> 00:01:19,380 Define a getter once, use it everywhere. 23 00:01:19,410 --> 00:01:21,150 Getters are also smart. 24 00:01:21,150 --> 00:01:23,940 They will only update if the state changes. 25 00:01:23,940 --> 00:01:26,820 This can help with the performance of an application. 26 00:01:27,060 --> 00:01:31,410 Let's prepare our application for using a getter in the next lecture. 2453

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