Let us continue and the other thing we're going to see in this lesson is to add a new button here.
We are going to add another head here in order to heads here.
It's table heads.
We're going to call this action.
And here we are going to put an increase button.
And this button will allow us to increase the specific price of the index.
For example, we have the index zero.
And once we click, for example, in the increase button, we are going to increase only the price of
Toyota.
OK, so let us back in our viewers, your codes, and they can see if we try to scroll down, gonna
have a component, which is car.
And if we come in instead of our car components, we are going to add a new table division, OK?
And instead of this table division, we are going to have button like this.
OK, and here we are going to say eight increase.
OK, make shotput increase.
And if we try to make here, you're going to see we are going to have the Fed table division.
So let us back in already.
Micheal's and it is the Fed tiered.
OK, here we are going to say table it in on the table hit and here we're going to say action.
It has put Actient leaders back here and you can see we have action, and once you click on this button,
you're going to increase or so this specific price.
OK, but we have this baton.
We are increasing the entire prices.
OK, so, yes, you can see we have finished with spots, so we cannot record these parts.
So what's required here is to use a two ways.
The first week we are going to be using is the buying function and we're going to use or store it raw
function, because as you can see, if you want to update is specific price by clicking on this button,
for example, on this specific button, you have to know the index, OK, the parameter of this line
of this error, for example, of Toyota, as you can see, we have the index is zero.
We have the index one and we have the index two.
So we are going to be using parameter, OK, in order to aggregate, OK, the price of this specific
elements.
So let us make our visuals, visual studio cards and let us come here already cost car components.
We are going to add another perhaps because as you can see, this is a components and we are going to
create the props that we can get easily in our butts on here once we click.
OK, so let us see what I mean.
Let us begin my car chase.
I'm going to create a new attribute in you, perhaps that I'm going to call.
Click is going to be equal to this the first way we are going to be using the brain function.
OK, and we say, is this dot like a state now, this dot increase or I'm going to call this function.
OK, let us big fist or here this is my function, OK?
And I'm going to commence all these.
Yes.
Letters comments or this.
I'm going to to no.
Increase.
Increased price.
We're going to leave this.
And we are going to create a narrative function, OK, in the functio only 40s.
OK, yes, we are going to see.
Increase.
Unique price, I can't.
With specific specific for us entry, OK, and this dysfunction will have a perimeter index.
OK, yes, that is.
And here we are going to say these dots increase.
A specific, a Pruss, Andrew NPF, this and use the brain function.
This is the first defense we are going to be using.
The first parameter is going to be this and the second one is going to be index.
OK, so we are going to take this index, as you can see, OK, we have zero one and two and each time
away map function will be executed.
We are going to take this specific index, like if the index is reason for zero.
OK, here we are going to have zero is parameter.
And if we try to come here in order to increase specific trust in the function, OK, we can easily
get our index, OK, because we have put it there.
So let us try to say concer like OK.
And I'm going to say.
The index.
To increase.
Is this a card index, OK, not we can take out a parameter and if it's rates reloaded speech here,
I can increase click on it or cheerleader's big here.
These thoughts behind.
OK, so we have a props, as you can see.
Yes, click here once we click, it doesn't work.
Why we must call these props.
OK, let us copy these props and come in.
Our ecology's OK and come here.
We are going to say unclick OK.
Yes, I have Forgety.
I have forgotten to do like this and here are going to say yes.
Here we are using as you can see and we are using a glass components like you are going to say is this
not props don't click.
But if it was a simple function, a key function components, we are going to say only props don't click.
But here we are going to say this, those props that look like this.
So let us make here.
OK, let us click on Increased.
You're going to see the index to increase is zero once I click for the first button because this index
is zero.
OK, if you click on this segment, you're going to see the index to increase is one.
And once they click here, you're going to see the index to increase is two.
So that the say is to take these specific elements in order to increase.
If this data in our case, we are going to increase the price.
OK, it is making our visual style code.
I think that we have succeeded.
Let us come back in our car JavaScript.
The first function is by using the brain function, the first method we are going to be using and let
us come in already increased.
Yes.
Here, increase a specific and for us and let us come here.
And the first thing we are going to do is to respect the immutability condition in Regius.
But as you can see here, we have restored to make a copy of this specific index, which is in our makers.
OK, make sure to do that.
So what's required?
We are going to do it to Heifer's for a contest that's going to call new car in singularities can see.
Because we want to make Facebook a copy, OK, of this specific index, OK, which is this index, if
it is zero economic first for the copy of the zero index, I'm going to say a new car is going to be
equal to dot, dot, dot this.
Those states, OK?
So here states, state, make my car's OK, make like this in sports book index.
OK, if the index is equal to zero, we are going to get zero here.
OK, and here you are going to say that.
Yes, you're going to put it like this.
OK, so we are going to remove these square brackets.
We are going to put braces like this.
OK, so the first thing you need is you're going to make a copy of your specific elements of the specific
index.
OK.
And after that, what you're going to do?
You're going to update this specific index like you're going to say new car dot price plus plus, OK,
you increase your value, Esveld.
OK, and the second thing you're going to do, we are going to make a copy of the entire states, which
is my cars.
OK, and here we are going to say new cars.
OK, new cars, this.
Your car is going to be equal to.
We are going to make a copy of the entire we are going to say states that make cars like this.
OK, so they don't make cars.
These state new cars is not defined.
OK, so we going to say, Constance, OK, things like this.
OK, at once you finished like this.
What you want to say, you are going to bring you updates in scope according to these specific elements.
OK, what are you going to do.
You're going to say new cars in plural in this index.
OK, you are going to make this up that you're going to say new car with this modification.
OK, you are going to say new car.
Yes.
Like this.
OK, after finishing to do like this, you're going to call your state a state state function.
OK, so it states.
So make sure to respect the immutability condition.
OK, and what are you going to say?
You're going to say my car is going to be equal to new cars like this.
OK.
Let us scroll down and if we try to make here, then reload speed and if I come here and click on increase,
OK, you're going to see I'm going to increase this specific price, OK, of this index once I click
on the thinking, OK, you're going to see I'm going to get this.
Very good.
OK.
And when I click here, I'm going to increase all prices.
Very good.
And make sure to respect this condition.
OK, this is the first rate by using the bind function.
OK, as you can see here, we gave the bank function.
You can also use the arrow function.
OK, let us remove the brain function, remove the brain function which we remove these key weights
which is this.
I can't let us back here, excuse me.
Let us back here and reload speech, where is the error?
A maximum of this.
This can happen.
It is big for you index.
OK, so here we're going to use the second we e by using by using the euro area euro function.
OK, yes, that is it has relied.
OK, so click on increase.
OK, as you can see it, you can use also euro function.
So in our case, we are going to be using the euro function.
OK, very simple.
And we're going to continue through the next video.