All language subtitles for 012 Pinia Hooks_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,060 --> 00:00:04,410 In this lecture, we're going to use penny hooks from within our components. 2 00:00:04,410 --> 00:00:09,540 Believe it or not, Peneha has vast support for the composition API. 3 00:00:09,570 --> 00:00:16,110 Most examples from the documentation will utilize the composition API over the options API. 4 00:00:16,140 --> 00:00:22,920 It's incredibly easy to use these state getters and actions from within a store to get started. 5 00:00:22,920 --> 00:00:29,580 Let's review the configuration for the store in our project inside the store's directory, open the 6 00:00:29,580 --> 00:00:31,500 counter JS file. 7 00:00:33,690 --> 00:00:39,090 Inside the store, we have a state property getter function and action function. 8 00:00:39,120 --> 00:00:46,570 The goal of this lecture is to use the state getter and action function from within the about component. 9 00:00:46,590 --> 00:00:50,020 We do not have to register peneha with the application. 10 00:00:50,040 --> 00:00:52,470 I have taken care of that step for you. 11 00:00:52,500 --> 00:00:54,600 Open the about component. 12 00:00:56,740 --> 00:00:58,150 At the top of the script. 13 00:00:58,150 --> 00:01:01,810 BLOCK We can import the store like we usually would. 14 00:01:03,920 --> 00:01:06,080 Next in the setup function. 15 00:01:06,080 --> 00:01:08,420 Define a variable called store. 16 00:01:08,450 --> 00:01:12,620 Its value will be the used counter store function. 17 00:01:14,760 --> 00:01:15,930 Just like that. 18 00:01:15,930 --> 00:01:19,170 We have access to the store from within the component. 19 00:01:19,200 --> 00:01:20,460 It's that simple. 20 00:01:20,490 --> 00:01:27,000 The store exported by the file will be a function we can call this function to gain access to the state 21 00:01:27,000 --> 00:01:30,660 properties, getters and actions from within the store. 22 00:01:30,690 --> 00:01:34,560 Let's try using these values at the end of the function. 23 00:01:34,560 --> 00:01:37,380 Return an object with the store variable. 24 00:01:39,560 --> 00:01:40,280 Next. 25 00:01:40,280 --> 00:01:43,340 Inside the templates, add a paragraph tag. 26 00:01:45,430 --> 00:01:49,180 Let's output the store counter property. 27 00:01:51,350 --> 00:01:53,630 Add another paragraph element. 28 00:01:55,650 --> 00:01:58,950 This time output the double count getter. 29 00:02:01,130 --> 00:02:04,280 Lastly, add a button with dummy text. 30 00:02:06,470 --> 00:02:11,690 On the button element at the Click Event Listener with the Prevent Modifier. 31 00:02:11,690 --> 00:02:16,310 If this event is triggered, we're going to run the increment action function. 32 00:02:18,440 --> 00:02:19,260 That's it. 33 00:02:19,280 --> 00:02:23,240 Let's try testing our work by refreshing the page in the browser. 34 00:02:25,320 --> 00:02:28,880 As you can see, the application is completely functional. 35 00:02:28,890 --> 00:02:32,430 We can press the button to run the increment action. 36 00:02:32,430 --> 00:02:36,540 As we do so, the state and getter properties are updated. 37 00:02:36,570 --> 00:02:43,140 Admittedly, using Peneha with the composition API is easier than using it with the options API. 38 00:02:43,170 --> 00:02:48,730 Previously we had to map these values with the composition API. 39 00:02:48,750 --> 00:02:52,440 It was simple as calling a function and returning the store. 40 00:02:52,470 --> 00:02:56,470 You may prefer the composition API over the options API. 41 00:02:56,490 --> 00:03:02,940 For this reason, in the next lecture, let's continue our discussion of the composition API. 3813

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