And here we are going to solve this problem and was a click for his report on AIDS.
The desire is to tense these days to close and once they click on close and close to AIDS, because
we want to display our from here once they click, for example, on from and Wendy Tait's returns on
late details when the text will tend to close.
We are going to hit it from here.
Okay.
And that was strictly for his own close and it's real close.
It will close out from.
So this is what's required to and let us work our way up to chase up to other scripts which is here.
And reason why I have I I have invested you to use a class components because we are going to create
a state here which allows us to solve this problem.
OK, and here I'm going to create a state and I'm going to call the states and to say states, please.
I'm going to say this is going to be true, is it is, uh.
From Auburn.
OK, I'm going to create a state in my state with tea, which will have it in boiling tub like is from
open and by default somewhere safe force the.
Yes, by default.
I'm going to say first, because when the form is closed, we are going to have here.
It's so wait, you're a little three loads, OK.
OK, it's from open for Spidy folks, and what I'm going to say, I'm going to come here inside.
And let us put it here, I'm going to say this, Dotts.
OK.
Uh.
Yes, I'm going to say this, the state.
So it's his form or pen, if is it if it is true, and then I'm going to say close.
OK, Idrees.
Audrie's.
I'm going to say it like this, and I'm going to take this condition, I'm going to grab this condition
and put it just in my bottom, OK?
And it will pass.
It will be a props here, props to children.
OK, it is big here and there if you try to make sure you don't see it, we have AIDS.
We do not have we do not have the clothes.
OK, but if I try to change what is from open to true, if I try to make here, you're going to see
I'm going to have clothes are very good.
So what's required.
So here we are going to have a props, for example, for four spots on because we are going to click
we are going to click on the spots.
But here we have the components.
As you can see, this is the real button and we are going to detect these props here by using the unclick.
So we are going to take the same props here.
We are going to put it also in our approach.
So what we're going to say Gleek is going to be equal to and here we are going to create a narrow function.
We are going to say this.
That said states, we are going to.
Carney said it's because we are going to at it if you click on, it's OK by default, the is from our
is equal to true.
Once you click, it must tend to force and hear the text.
We tend to close.
And once you click on Glos, it will update our ease from open to AIDS and to true.
And the test will be Ed, let us make sure and say, hey, here we go.
The car is from open and it will be we are going to use the priv states like separate states not.
Is up pain and here we are going to put it like this, put the exclamation mark.
And if Iraq is not defined, it's not required.
We are going to come here.
We are going to define our states here, preface this and say we have to put all this prices.
We are going to grip all the controversies.
So what are going to do?
We're going to say every function and put the brackets and put all these called instead of brackets.
OK, so this is the importance of the error function.
So you can't write a line of code like this.
And if I tried to make here and click on it, you can see it tends to close.
If it was a click on close, it tends to edge.
OK, so very good and very simple.
So the desire is to have a form like musically, for example, on AIDS, to have a form here once a
click, for example, on Close and I close, then I can have the state AIDS.
So let us begin our visuals to your code.
So what are we going to do?
We are going to create a new component that's regional, called form and a form will have a stateful
will be three components because in our ifone we are going to aids the brain's color and PRUs.
That's mean we're going to have states and it must be a stateful component.
So make sure to come in your state first folder here.
So make sure to close like this, because if you create a folder like this, it will be created in instead
of the Calford.
So we don't need to put it inside of the folder, but we need to put it directly inside of the state
for a folder.
So let us right click click on new folder and we're going to say form like this is new for this.
So let us rename put it in small case.
And instead of reform, we are going to create a new effort that's going to call from AIDS, you can't.
If it's like this, not JavaScript, that is very good and here it will be a lot of components.
We are going to say Riet plus components exports.
Let us remove this export here, as you can see, and let us remove these deep and leave the empty tag
and in which we are going to return this message in by using the H1, the H1 type and Rotary Anastacia
are we're going to see, for example, an AIDS car.
Very good.
This is the title of a form and we are going to come to our app.
Look at.
Approaches, you know, little cart is a phone just before our button, because when we click on it,
it will tend to close and the button will be down here and our reform will be it both will be above
or a button.
Okay, so let us come here.
What's we're going to say and we are going to call this a.
Are going to cover this here.
We have to say from Ed, OK, we are going to call these, uh.
We are going to court this component, so reason why every time you create a the components which really
have a glass side, make sure to put your first upper case, because when you are going to a to create
your class by using shortcuts by default, the first letter will be in uppercase.
So respect the class convention.
OK, so little sense if true, if in uppercase like this you can sense or not.
OK, so there is no problem.
So let us rename only I'm going to say from the contents or not is it is not a problem.
So I'm going to come here from and I'm going to call up in my apologies.
What came from it.
Not just in here but I'm going to set a condition, I'm going to say you have to display this form only
if A is from or pain.
It is true.
Idrees, not from Ed.
So we're going to I'm going to say these dots, state dots is open, so I'm going to use this condition
and this condition is true at this condition verifies only if the state is true.
OK, so I'm going to say, if it is true, what you to say, you are going to put this.
A farm aid kit from it, and as you can see, it gets automatically that we have it from components,
from eight components.
If you click on it, you will automatically import today from components in your approach.
So let us try to click on it and let us make here.
Leaders, you can see, have from it as components and we have components that food comes from and we're
from it like or you can put it.
And here I'm going to say that is very good.
And if I try to make here those most Montrouge corresponding.
And just in from Edwards, yes, your has come from Regis.
And.
There's not much.
Mm hmm.
Okay, so we have reanimates buy in from Ed, we can see, uh, it does not recognize this case.
You can see from is in.
Smartcards let us be apologists here, so we are going to change this, if true, a flat is in uppercase.
Yes, I can see if you tried to click on it.
Yes.
You can see you have Ebtekar.
And once you click on close, you have it's like this.
Very good.
So we are going to continue through the next video.