All language subtitles for 020 An Alternative Function Syntax_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
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
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
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

Original subtitles

Now to really conclude this module,

I just wanna show you an alternative syntax

for writing these functions,

any kinds of functions in JavaScript.

A syntax which is not exclusive to React by the way,

but which can be used in any modern JavaScript application.

Instead of writing a function like this

with the function keyword,

you can also write a so-called arrow function,

and attached you find a link with more details

on these arrow functions.

Again, it's not a React specific thing.

To use that arrow function syntax.

You replace function with const to create a new constant

with a given name app in this case.

And then the value which you assigned to this constant

is an arrow function written like this.

A list of parameters then an equal sign

and a greater sign forming such an arrow

and then the function body between curly braces.

And again, that's really just standard JavaScript code.

You can absolutely stick to the function keyword.

This is just a syntax, which I personally prefer

because it's a bit shorter or yeah, I just prefer it.

And therefore I will migrate all my functions to

this syntax like this here in the case of card

but you don't have to do that

if you prefer the other syntax, it's really 100% optional.

And in this case here

it doesn't offer any benefits or anything like that.

It's really just personal preference.

And I want to show this syntax here

since you will also see that in a lot of React projects

and you therefore should be aware of it

that you can write your functions like this,

any functions by the way, not just component functions.

And with that, we're really done for this module.

It was a huge module.

And yet we're still only scratching the surface.

There's way more to explore about React.

And the next thing we are going to explore is how

we can make this a bit more interactive

and reactive because currently it's all static.

This data never changes.

As a user we can't do anything about it.

And we are building modern user interfaces

with React because we typically want to

build user interfaces where things can change.

Therefore, in the next course section, we are going to dive

into another important React concept,

state because that will help us

make our applications interactive.

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