All language subtitles for 009 Emitting Events_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,770 --> 00:00:07,280 In this lecture, we're going to learn how to emit events from these set up function, previously we 2 00:00:07,280 --> 00:00:13,370 had to look at an alternative for accessing Rev's in the script section of the component that you likes 3 00:00:13,370 --> 00:00:19,340 to inject global methods and properties via this keyword, since we're working with the composition 4 00:00:19,340 --> 00:00:20,030 API. 5 00:00:20,270 --> 00:00:22,280 Those global functions are gone. 6 00:00:22,820 --> 00:00:26,480 In some cases, we may need to emit custom events. 7 00:00:26,510 --> 00:00:32,390 Events can be emitted from components by calling the this dollar Sinemet function. 8 00:00:34,950 --> 00:00:40,800 We don't have access to this function from the this keyword, if we want to emit events, we'll need 9 00:00:40,800 --> 00:00:43,550 to update the parameters of the set up function. 10 00:00:44,010 --> 00:00:46,320 Currently, I'm in the alert component. 11 00:00:46,620 --> 00:00:52,950 We're accessing the props via the props parameters, the second parameter of the set of function if 12 00:00:52,950 --> 00:00:55,950 we choose to use it as the context object. 13 00:00:58,520 --> 00:01:05,300 The context object gives us access to information about the component it's being used in, this object 14 00:01:05,300 --> 00:01:10,280 comes with the Imit function we would regularly encounter in the this object. 15 00:01:10,610 --> 00:01:15,650 If we want to emit an event, we can call the context Emet function. 16 00:01:18,270 --> 00:01:25,290 The Imit function has the same arguments as the this stop dollar sign Sinemet function, the first argument 17 00:01:25,290 --> 00:01:26,750 is the name of the event. 18 00:01:27,180 --> 00:01:29,080 This can be a custom named event. 19 00:01:29,520 --> 00:01:33,360 The second argument is a payload to send to event listeners. 20 00:01:33,360 --> 00:01:37,990 If there are any, we are going to omit any events from this component. 21 00:01:38,280 --> 00:01:42,170 I just wanted to show you can Emet events if you ever need to. 22 00:01:42,450 --> 00:01:47,640 I'm going to remove this line as well as remove the context parameter from the function. 23 00:01:50,200 --> 00:01:53,620 After making those changes, I'll see you in the next lecture. 2428

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