You are going to say in the index zero, you are going to take something else, a price, OK, and you
are going to say plus plus you are going to increase its price.
OK, know how you can see now how I can see you can and you can see you are updating your copy and you
are not you are not updating directly your status.
OK, because the šemeta immutability condition says you cannot imitate muted direct to your state.
OK, first of all, you going to make a copy and after that you're going to use the states, set the
state a state state function in order to update your your states.
As you can see, new cars in the index zero.
You're going to take something as press and you're going to increase in the fakin.
Thank you.
Also, you're going to see new cars.
You're going to say one.
OK.
And here you are going to say to OK, and you are going to increase this price, OK?
And after updating your copy, what you are going to do, you're going to call the state function this
dot.
States, states like.
Like this and what are you going to do?
You're going to take new car, you're going to take my car.
OK, you're my car, which is here in your state.
And you're going to a son needs two new cars, OK?
New cars like this.
And once we try to make sure and take on price, you're going to see we are updating each us of our
right table.
OK, very good.
So make sure to respond to immutability.
Condition in reactor is the first thing you need to do is to copy your state by using this function.
For example, in our case, you have your copy and then you are going to update in your copy.
OK, we are going to update your copy and after updating in your copy, you're going to take your copy
and assign it in your state.
So do not mutate.
Do not say update directly.
Your state, like a frazzling party can say, I don't want to do like this.
I'm going to say directly, once you click on this, you're going to see, for example, these dots
state those my cards, OK?
And you're going to say, for example, in the index zero, you're going to take the price and C++,
OK, because if you try to make a console like Grip Garibaldi's, if you want to put a console, like
once we click, like here, you're going to find we are going to really have this value which is here,
OK?
And you can say no, I can directly update this value by putting this lamp.
Of course it can't work because you don't use this that that function.
OK, if we try to make here.
Let us reload this page, click on Press, it gets Wick's each week.
OK, so make sure to use the immutability condition in reactors.
OK, so let us back here and do not also do like this.
OK, you remove reason for this lies OK.
And I do like this to not do like this, even if you're calling the state function.
But if you do like this, you don't respect them.
You don't respect the.
The immutability condition are in reaction.
If you do like this, it will work, but you don't respect the immutability condition of reactionist
because the first condition is to make a copy.
OK, if we try to make sure you're going to see if you try to increase its will, but it is not recommended.
The first thing you need is to make a copy.
Just click on slides because if you do like, this new car is not a copy, but it is just a reference
of your states.
And when you are updating your state like this, you are accessing directly in your state.
But make sure to put this OK in order to update all your copy.
And once you call your state state function, you are going to assign to your state, which is my cars,
new cars like this.
OK, make sure to put this functions under is if you want to use, for example, the SASE.
A method, instead of using dogsleds, you can use the model JavaScript.
OK, take all this puts or in square brackets and just in the beginning, put three dots, one and the
first, second and third.
OK, put like this once you put also the syntax, that means you have make a copy.
OK, from my cars, two new cars.
OK, and if you tried for example, to say Consols like you say, for example, new cars.
AK.
New cars and you say concert log here, you're going to say, for example, these dot states that my
car's OK, you're going to see that you're going to get the same thing.
The difference is new car is new cars is a copy.
And there's this dot.
The states that make cars is the state that we have.
So if we try to click here, like you can see, this is the copy and this is the state that we have.
OK, you have the same thing and make sure to update your copy.
And after that, you are going to take your copy and assign it in your state by using the state that
function.
OK, I think that it was a very interesting and very easy to understand.
OK, make sure to use this dot the state.
You can use this this great.
If you want to make a copy instead of using like this, you can use a follow.
OK, so let us come here.
You're going to say for.
Ladies, I is equal to zero.
OK, I is.
Laced den is listing new cars like.
You cast doubt length.
OK, and here in a state I plus plus like this.
OK, and here we go to take these new cars.
And here going to put I.
It is coming up this week and we're going to get the same thing if we tried to reload, increase.
We're going to get the same thing.
Very good.
Like Ataris if you do not want to use this AK.
If you're not wards or so, choose this for loop, we are going to use the map function.
OK, let us comment this.
We are going to use the map function.
I'm going to commence also these comments.
So like, let us use the map function, how to use the map function, the map function.
We're going to come here.
What we're going to do, we are going to create a Konstanz that's regional.
Also we're going to call new cars, OK?
And you're going to say this states that my car's.
In this state does my cars, and here you're going to see a map.
OK.
Yes, and here you are going to say, put your first perimeter, it is called.
I can't.
Your perimeter is calm, OK, and here you're going to put your in brushes and you're going to call
that return and put this call, the car is not put brackets like it.
And what you're going to do, you're going to say and.
The first is Brent, as you can see, we are going to repeat all things you have in your.
OK, I think you have in your in your state, because when you're using also the map function, OK,
you're going to see it is like it is the same thing with a that means you are you are you are occupying
your state, OK?
It is a copy like reason where you are going to repeat all the things you have in your state.
You have brains.
It's like you are making a copy, OK, and you are going to say cardboards brings back puts comma and
you're going to say also coller is going to be car dot collo.
OK, this is copy.
You are doing car.
It is a copy, and here you are going to see separate and here we are updating this press and here we
are going to say cardboards price.
Cartloads price, and you're going to say plus one.
OK, and we are updating PRUs and said other things will remain the same.
OK, and make sure to take your new calls function.
You're going to call your new car functions here.
It is a copy.
And you are going to assign this value in my car or in my car like this.
It is a copy when you're using this map function in a Sundays in your new car.
OK, and then you can also respect the mutability condition in reactivates.
And if we try to make here and reload speeds, click on increase.
OK, you're going to see we are going to get the same thing very close.