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
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
Persian
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
In this lecture, we're going to learn how to emit events from these set up function, previously we
had to look at an alternative for accessing Rev's in the script section of the component that you likes
to inject global methods and properties via this keyword, since we're working with the composition
API.
Those global functions are gone.
In some cases, we may need to emit custom events.
Events can be emitted from components by calling the this dollar Sinemet function.
We don't have access to this function from the this keyword, if we want to emit events, we'll need
to update the parameters of the set up function.
Currently, I'm in the alert component.
We're accessing the props via the props parameters, the second parameter of the set of function if
we choose to use it as the context object.
The context object gives us access to information about the component it's being used in, this object
comes with the Imit function we would regularly encounter in the this object.
If we want to emit an event, we can call the context Emet function.
The Imit function has the same arguments as the this stop dollar sign Sinemet function, the first argument
is the name of the event.
This can be a custom named event.
The second argument is a payload to send to event listeners.
If there are any, we are going to omit any events from this component.
I just wanted to show you can Emet events if you ever need to.
I'm going to remove this line as well as remove the context parameter from the function.
After making those changes, I'll see you in the next lecture.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.