All language subtitles for 002 Our Target State & Starting Project_Downloadly.ir_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
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 Download
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 for this course section,

you should of course know what React Context is.

That's a prerequisite and therefore

I strongly recommend

that you go through dedicated React resources

diving into React Context

before you continue with this section.

And with that out of the way attached

you'll find a notification component file

a sip file containing this notification JS

and this notification.module.css file.

These two files are attached in this sip file

and you should add them to your project

into the UI folder in the components folder.

That's a simple presentational component

which will just output a title and a message

as a notification shown at the bottom of the screen

once we do show it.

At the moment we have no code for showing it

but that's about to change throughout this course section.

Now one important note first,

you don't have to use React Context

for this course section.

For giving the user some feedback

about the current status of the ongoing HTTP request,

you could also just use Local State

and provide any feedback of your choice.

My goal just is to show an overlay

a little notification at the bottom of the screen.

And I wanna control that globally with the context API

so that we can trigger this notification

and control this notification

from anywhere in our application.

That's my only goal here.

Now, therefore, before we add react context

let's see how the end result is should look like.

Let's go to the underscore app JS file in the pages folder.

And there we have our layout.

We have the head section with the general head data

and we got this component prop

which renders the actual page content.

Now in here,

I also wanna output the notification component.

And for this, we need to import notification

from the components folder there

from UI and the notification JS file we just added.

I'm just adding it here so

that you see what we will add from this section.

This notification component takes three props

a title, a message, and a status.

And therefore I'll set these three props here now.

I'll set the title to test, the message

to this is a test, like this

and the status to pending, for a start.

If we now save, we have this notification element

at the bottom, and the goal is to show this

once we did click the register button

and then once the request succeeded or failed

we wanna replace it with a proper error or success variant.

Let me show you these variants here.

If we changed as to success

if we change the status to success, this switches

to this success notification with a green background

and if on the other hand, we change it to error

this switches to this red notification.

So that's the notification, but

of course it shouldn't be hard coded here.

It shouldn't always show up.

Instead it should only be shown when we want it

to show up when we have an ongoing request

or when we have a response from our request.

And I wanna control it with the context API

because I want to render the notification component here

in underscore app JS,

but I wanna trigger it from inside other components.

For example, from

inside that newsletter registration component,

where we also send this HTTP request.

And because that's the case,

because it is components should be triggered

from totally different components than the component

it's being rendered in,

I wanna use app wide state management.

I wanna use the context API

to a wide pointless prop drilling

and long prop chains across multiple components.

And therefore let's now start using the context API.

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