In this part we are going to talk about how to use a custom book to be a generic way such that to get
the information from the phone.
So like before we are going to create a component folder and then inside a component we are going to
create a form of J S and then inside a form we are going to use the you'll stay.
So we in for the USDA if we add and then since we are going to get the name and also the email from
the form.
So we created to estate on its name and the other is email and then inside it if we are going to create
a form.
So now one use name and the other is email and inside the input field.
We are going to create a well it was we can buy this name and the order used said the word is and lost.
We are going to create a button
and then we clear the summit ended up and then we are allowed a name and email
after the alert.
We are going to set the name and also the email will be empty and then we pass the function here.
Then we pay for the MTA yes and we are going to import the form from the component folder.
Now we can type the name and email and where we click this.
It will alert email and also the name and it will empty after we kicked it.
OK.
Now we are going to create a custom such that we do not need to use these.
You stay.
So for us we are going to create a folder for all custom book and then we create a user input thought
to ask.
Now you instead of import a we and we are going to import you state and then we passed the initial values
here and then we are going to create a we start functions of a pass based function that is going to
be praised each two fat functions and then this part is going to be praised is too.
So we are going to a university where Leo and also need to add their own change.
So here we have to add the word deal and the value is where Lu and the order is on change.
And on change you will have to offset the wherever yields to the target top value.
And since this is yes.
So we do not need to wait where it is here.
We just need to write one where it was at last light before we have to return to values.
So where are those by form and also clear path.
So now at the fourth we can clear the.
You will stay in also we do not need these two or we change this to a by name and also by email and
the first thing is a clear path.
So here we will at key a name and also key email and each part we are put into a use that you will stay
in is that we are going to use the user input from the customer poop.
Now we do not have a set email and also said Ma'am instead we are going to use the Q Name and create
email and then inside here we do not need to use days in that we are going to use by name and also by
email now we can try this again
now we still work.
And one thing to make you feel a little bit weird is this thing actually is by email or by name is from
here.
Actually this is not HMO.
It is javascript.
So if you would use this bet operator you will spread out these wherever it was and auto on change.
So if we code with a user input and then we change these values simple values and also we even delete
these one
and then we set it to here for example this time we are not going to
send a type as past.
We are going to set a type as possible.
So if you go to here you kind of see this already set of values to sample values.
Yes you can see it already set the radios to a sample values and also the type as passwords.
So now you can see the name and e-mail we will become a list of thoughts rather than the past so I hope
this can help you understand why we can do a spread operator here and because we just spread out these
properties into our input field.