Welcome back In Session and we are going to talk hurricane aid, something to cut, how can it be a
product cut by clicking on this button?
If you click on this button, we're going to see hurricane aid, a product in cuts.
And the first thing we're going to learn is to create a new function.
We are going to create a new function that's original name ID to cart.
A to handler.
OK.
And it's cut under it's be.
And here we're going to have a.
A parameter which is which will be an object of different elements of cars such as the price or have
the brains, we have the image, OK, and this is the parameter Astroglide defined.
And here we are going to to create an neural function and we are going to test this function to see
if it works perfectly.
We are going to see the interaction between dysfunction and is a to Cuthbertson.
So let us scroll down and we are going to come in over the course.
You can see we have the cars here because our different button of air to cards is our they cause components,
OK?
And there we are going to access or so the vaquero in singular because each button is included in the
car and singular like the car.
So let us come here.
The first thing we're going to do is through.
We are going to create a props in order to access our our unclick attributes of our bottom because the
event is unclick.
OK, so let us make sure we get to create a props that's real name, easy to cut.
And I'm going to say on it to cut like this, it's called solidness chlorate.
Make some correction.
OK, let us come here kaat like this and let us make an effort to cut.
Indro is going to be equal to this n.
It looked at this and then we can take this function, which is to cut and paste these functions, all
right, and cut reaches out props, then we're going to copy our props and we're going to bring our
props inve course not, because I can see this is the way cause in Blue Rudloe chairs components, which
is integrated into Holmdel Chase.
So let us take these props and bring this props inside of all the cost that chase.
And here we are going to create a new function.
We're going to create a new function that's regular need.
A new new we are going to create a new props place that's going to name and add to CART.
OK, it's Ricard's, you're going to call this process.
We are going to use the same name.
And here we are going to say we're going to define a narrow function.
And because by calling our props, which comes from Hamdard Chase, we must put a parameter.
Akec, because this function requires a parameter here AURIN function.
So let us back into our vehicles, click on it.
We have our error function.
We need to create in the real function within NMT parameter overeagerness say like this.
And here we are going to put our props.
OK, you're going to say props.
Props don't like this.
OK, we are going to put this in.
Do not forget to put your parameter here and we are going to Saqqara because we have the we've object
objects.
We can get the idea of the car.
We can get depressed of car.
We can get all thing about the car.
It is our data that isn't very good.
And let us do like this and we are going to test the interactivity between our two cardboard and then
our areto can't function.
So let us copy these props.
We are going to copy perhaps.
And so we are going to come in, they call singular in which we have the parts and components because
we want to see the reaction between these parts.
One, OK, and these are our function because the event is Ontake and what we're going to do here and
here, we are going to bring the same props here and let us create a new process.
We're going to always add to CART.
You can choose your own weight you want to use in order to create your props.
In my case, I'm going to use the same name here.
I'm going to say and props Dods.
This is my props and I'm going to call my props instead of my bottom.
And after that, I'm going to take these props.
And they really are a bad sign here and here.
We're going to do we are going to be creating the unclick.
We are going to call the unclick attributes.
That is, and we are going to say props those extra cards, and by clicking on edge cuts, we need to
send a message because when we click on Add to Cart, OK, that means we are going to call this function
OK, because we have created a props.
We have passed these props from Dodgiest to they cast votes from very close to tears to they call and
they call is where we have the baton.
And when we click on this button we must call this card this function.
And then we have passed these props from the vaquero, singular in a box and the chase ends in the Baton
Rouge.
Yes, we have the funny the unclick attributes in order to make interaction between our baton and our
function.
That means once we click on this button, then we are going to a call, OK?
We are going to call our function and let us back in a hundred years.
So we are going to we are going to make a call log in order to see because you can see this is the very
core and the very core is an object in which we can take all properties of our car.
And if you want to get, for example, the name in the ID, I can see I can display to your.
OK, so we're going to say so in this case, I'm going to be using the template literals.
I'm going to say, for example.
The idea of.
It's like the.
Element is we going put a dollar sign like we're going to put out called braces, so we're going to
we're going to say they call it is better to use the template literal and they call notes every idea.
And what's the idea like this?
And the brains.
Is the brain is to the same thing I want to say.
Do not forget to put a dollar sign.
They call.
OK, dot points like this, and if we try to back in Aughrim.
Application, let us click on consult and click on this specific button.
Or is it a process that it's required is not a function word?
It is not the function.
Proops.
OK, it is not Proops, it cuts from homology, let us rule on their goods and yes, it's cuts.
It cuts, yes.
Here we here we have to we need to put it to cuts in.
OK, this is cut.
And this is the mistake that we have made, OK?
The props that's required because we we do not have this function.
We will not have the function of this name.
It is hard to cut and paste.
Soyabean.
Excuse me.
It does reload this page and let us click here.
Very good.
The idea of the selected elements is the country at the brink is my and if I click on this Toyota and
the idea of the selected elements is car nine and the brand is Toyota.
OK, so you can see we have interaction between our bottom here and our Entocort function and our Ed
to Catanzaro function, which is a great car, which is in a Honda Chase.
And we're going to continue in the next video we are going to be talking about, hey, you think Hurricaine
creates an array in which we're going to keep different elements?
That going, it's called.