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 verify if a variable is reactive, the composition API
is meant for very large components.
Somewhere along the line, it's possible to run into errors and error because a variable is no longer
reactive.
If we lose reactivity, our application may not behave as users may expect.
You provide two functions for verifying if a variable is reactive, they can be useful and debugging
an application.
Let's look at both of them.
Currently, I'm in the first project we were working with when learning about the composition API.
Specifically, I have the numbers just file opened.
The View package has two functions called is rough and is reactive, let's include both of them with
the important statement.
The is Reft function can be used for checking if a variable is reactive that was created with the rev
function, whereas the is reactive function will check if a variable is reactive that was created with
the reactive function.
We're going to update the import statement to include the reactive function because we'll need to create
a variable with this function for demonstration purposes.
Next, and he said function will quickly create an object called accounts.
This object will be created with the reactive function we imported.
It'll have two properties called checking and savings with random values.
The reason we're creating this object is because we want to be able to test the is reactive function,
our numbers look function didn't have any reactive variables.
After creating the accounts, Variable will perform a log to the console.
They long will output the return value by the IS Reft function will pass and the NUM variable to the
is Reft function.
Will create another log, but this time will log the return value by the is reactive function with the
accounts variable.
Both lungs should output true, since both variables are reactive.
We didn't change them, so they shouldn't have lost their reactivity.
Let's refresh the page in the browser with the console opened.
Both functions are returning true, this means our variables are reactive, the issue provides both
functions for testing f our code is reactive, it's useful for debugging and application.
If you were to override a reactive variable completely, you will lose that reactivity.
That may happen since we're not using the options API where we may accidentally lose reactivity.
Other than that, these two functions don't have much use.
That wraps it up for these two functions.
I'll see you in the next one.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.