Updates currently, and then we can easily take these props and come to the from edits, once you click
on updates, you are going to call the updates validation and function and a set of updates validation.
Hensler, we are going to call these props props those like these updates and updates car.
Once you call, for example, once you pass, for example, a function is like your props from the parent
component to the truck component.
Make sure to put this.
That means you specify that it is a function, otherwise you're going to get zero.
And if we remember our function, which is here has two parameters, four parameters.
We have idy brand, color and price.
So we need also to put all these parameters here.
And as you can see, we have already props, branes, color and price.
But where is the ID if we try to make here our cars doges?
You're going to remember the reason why I have the idea as parameters or as props here in order to get
this idea.
And I'm going to come here for everything I'm going to say.
This does props the idea.
This is the first parameter, but the segments and I can't use props, but I'm going to use the states,
okay.
Because props is the default value that we have here.
You also click on edit.
This is the props.
Okay, this is the props.
It is the default value that we can edit and update.
But once I edit something here and I add, for example, something like it is not a process, but it
is the ID edit the edit value.
And this value like we are using the control components, will be assigned it automatically in our state's
reason.
Why do not put those props, those prints, but put states in order to get the added value.
Otherwise you are going to get the last values, the prof's.
Okay, so you're going to say this, not the state that it brings like this and does it also this does
a state does color this, that state does price like this.
Okay.
Very good.
And let us faithful Mexicans alike, in order to see if it's rhetoric, we're going to say council like
and the face is going to be equal to.
IGY, are you going to say this, that perhaps that is.
Ladies, copy.
Once we click on updates, let us copy the Fagin's console log.
This does desperate.
It is Kopi.
The Grains Council log.
Hello.
Also, look.
Fabrice.
That is and once I click on update on update button, I'm going to call this function and then I can
view or props this, perhaps the idea props and the states, let us be clear here.
As you can see by these efforts, our state is equal to the props, as you can see by the efforts,
because this is our props, OK?
The value that we have by default, by default, we have it.
And also you click on update, you're going to see we have Toyota Fazlalizadeh ID a signal.
We have Toyota and we have black and depressed and was present applets my inputs and we didn't see yet
and we didn't yet have the we didn't still have the props as the default of our states, but it since
it changes and if I try to click on updates, as you can see, I'm going to get this added value but
not the props was the default reason.
Wait here.
When are we going to update by calling these updates?
Car drops do not put a props to its brands or these those properties color, but put the states okay.
It is very simple.
And if I try to make here, for example, click on Mercedez, click on added the I.D. fecarotta to the
different.
The default state is can see if Mercedez because we didn't get a date.
And if you try to edit let see us click on Added.
You're going to see we have these updates and then we are going to get these states value.
OK, as you can remember, if the the control ID components work, changing something in your input,
it will automatically update your status.
The very simple and let us comment this.
And here we're going to call these dots for us to stop this car and we are going to put all this information
and if we make sure our function and its will automatically update, OK, and the other thing we're
going to do here, once we have updated, we must restate.
Uh, is data editing zero OK, in order to back to the original table decision, because here, for
example, uh, I have I'm going to reload, click on edit for something like this.
Click on updates.
OK, the updates is done.
The update is done.
But I'm not big in the defaults table division in order to see these updates.
So they think we're here after.
After editing our cars already, my car's data, we are going also to edit is data editing to zero because
when we are going to come in this function here, these conditions is going to be true and we are going
to display our our default sensible decisions having these changes.
So let me update let us add something like this up.
It's very good.
You can see we have this update you make here.
Make something like an update.
We can see we have all these changes.
Click here, Mercedes's.
Increase up it, as you can see, wanting a country to start with the same key.
Where do you think he.
They just resort to like this.
One click on average.
Very good.
We are going to see wages for them up.
It is down, but we have.
Hey, we've just sent Kee.
These should be unique, that components maintained so.
Let us make Fister to see this problem in our component's we have.
Let us click on edit.
If it is, we have states which this is Eddie.
This is probably.
Interview branes.
You have all different states.
Later, seeing a record, different cars, yes, a last data editing is equal to two.
Is data editing.
The idea is to divide.
I was going to say this is true.
Ladies first, full reload.
And it's.
Lincoln cars, OK, we are going to see all these changes here over the first thing, the idea is to
the Siggins and we're going to update once we click here, we are going to take this idee.
It's one something Toyota and also we click on update, we should have Toyota updates here.
They point out that, yes, we have it's like this is anything.
It tends to zero.
Very good.
And here we have it is equal to one.
OK, and if I try to back in the segment, click here and I'm going to add something that is Mercedez
and the.
Is this editing is tends to zero.
Yes, yes to two, yes, because we have clicked on the arrow, which is to like I let us click on updates,
so by clicking on updates, uh, we can update each teen's.
Mercedez.
And it's changed since the first it has come here.
Yes, we don't still have three or so, we cannot solve this problem.
The problem is let us beg for so let us come in our updates.
OK, so this is the problem.
Yes.
Put like this.
OK, so I have forgettin which Lattis come here and something is a weakened cause.
This is our state by default is data editing is equal to zero.
So we going to reload.
It is reload.
Let us see by the first half is data editor is equal to zero.
Once we click on edits we need to edit is data editing to one which is the idea of the first click on
it.
You can see it changes.
It changes.
And once I add something here, OK, it's something like this and once I click on updates, it must
change here.
I can update it.
You can see it is transit's and this is data editing is tends to zero.
And once say back here in the second rule, OK, you can see the E data editing changes.
It tends to a two, which is this is the idea of the second row.
And if I try to add something here and click on it, you're going to see I'm going to get these updates
here and I'm going to still have to like either click on update.
Very good.
It's works perfectly.
And once they come here, it's something like this.
They can update their records.