1 00:00:00,620 --> 00:00:07,610 In this part we are going to talk about how to use a custom book to be a generic way such that to get 2 00:00:07,610 --> 00:00:09,700 the information from the phone. 3 00:00:09,800 --> 00:00:16,760 So like before we are going to create a component folder and then inside a component we are going to 4 00:00:16,790 --> 00:00:25,940 create a form of J S and then inside a form we are going to use the you'll stay. 5 00:00:25,940 --> 00:00:33,350 So we in for the USDA if we add and then since we are going to get the name and also the email from 6 00:00:33,350 --> 00:00:33,800 the form. 7 00:00:33,800 --> 00:00:41,600 So we created to estate on its name and the other is email and then inside it if we are going to create 8 00:00:41,600 --> 00:00:42,050 a form. 9 00:00:42,460 --> 00:00:48,340 So now one use name and the other is email and inside the input field. 10 00:00:48,380 --> 00:00:57,190 We are going to create a well it was we can buy this name and the order used said the word is and lost. 11 00:00:57,190 --> 00:00:58,530 We are going to create a button 12 00:01:07,610 --> 00:01:15,950 and then we clear the summit ended up and then we are allowed a name and email 13 00:01:19,550 --> 00:01:20,360 after the alert. 14 00:01:20,360 --> 00:01:26,460 We are going to set the name and also the email will be empty and then we pass the function here. 15 00:01:26,510 --> 00:01:33,770 Then we pay for the MTA yes and we are going to import the form from the component folder. 16 00:01:33,980 --> 00:01:38,140 Now we can type the name and email and where we click this. 17 00:01:38,320 --> 00:01:43,930 It will alert email and also the name and it will empty after we kicked it. 18 00:01:43,940 --> 00:01:44,780 OK. 19 00:01:44,870 --> 00:01:49,930 Now we are going to create a custom such that we do not need to use these. 20 00:01:50,150 --> 00:01:51,590 You stay. 21 00:01:51,590 --> 00:02:01,590 So for us we are going to create a folder for all custom book and then we create a user input thought 22 00:02:01,590 --> 00:02:02,240 to ask. 23 00:02:02,440 --> 00:02:09,800 Now you instead of import a we and we are going to import you state and then we passed the initial values 24 00:02:09,890 --> 00:02:18,850 here and then we are going to create a we start functions of a pass based function that is going to 25 00:02:18,920 --> 00:02:26,780 be praised each two fat functions and then this part is going to be praised is too. 26 00:02:26,810 --> 00:02:31,530 So we are going to a university where Leo and also need to add their own change. 27 00:02:31,550 --> 00:02:41,210 So here we have to add the word deal and the value is where Lu and the order is on change. 28 00:02:43,760 --> 00:02:50,480 And on change you will have to offset the wherever yields to the target top value. 29 00:02:50,900 --> 00:02:52,920 And since this is yes. 30 00:02:53,030 --> 00:02:56,620 So we do not need to wait where it is here. 31 00:02:56,630 --> 00:03:05,030 We just need to write one where it was at last light before we have to return to values. 32 00:03:05,030 --> 00:03:08,750 So where are those by form and also clear path. 33 00:03:08,810 --> 00:03:11,560 So now at the fourth we can clear the. 34 00:03:11,750 --> 00:03:20,830 You will stay in also we do not need these two or we change this to a by name and also by email and 35 00:03:20,830 --> 00:03:23,840 the first thing is a clear path. 36 00:03:23,840 --> 00:03:33,170 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 37 00:03:33,170 --> 00:03:40,870 in is that we are going to use the user input from the customer poop. 38 00:03:40,900 --> 00:03:48,020 Now we do not have a set email and also said Ma'am instead we are going to use the Q Name and create 39 00:03:48,050 --> 00:03:59,380 email and then inside here we do not need to use days in that we are going to use by name and also by 40 00:03:59,500 --> 00:04:02,080 email now we can try this again 41 00:04:05,820 --> 00:04:06,920 now we still work. 42 00:04:07,130 --> 00:04:16,630 And one thing to make you feel a little bit weird is this thing actually is by email or by name is from 43 00:04:16,630 --> 00:04:18,710 here. 44 00:04:18,820 --> 00:04:20,910 Actually this is not HMO. 45 00:04:20,930 --> 00:04:22,120 It is javascript. 46 00:04:22,990 --> 00:04:31,240 So if you would use this bet operator you will spread out these wherever it was and auto on change. 47 00:04:31,240 --> 00:04:40,300 So if we code with a user input and then we change these values simple values and also we even delete 48 00:04:40,360 --> 00:04:41,010 these one 49 00:04:43,770 --> 00:04:48,990 and then we set it to here for example this time we are not going to 50 00:04:51,660 --> 00:04:52,990 send a type as past. 51 00:04:53,020 --> 00:04:55,070 We are going to set a type as possible. 52 00:04:55,440 --> 00:05:02,590 So if you go to here you kind of see this already set of values to sample values. 53 00:05:02,640 --> 00:05:09,410 Yes you can see it already set the radios to a sample values and also the type as passwords. 54 00:05:09,440 --> 00:05:19,680 So now you can see the name and e-mail we will become a list of thoughts rather than the past so I hope 55 00:05:19,680 --> 00:05:29,340 this can help you understand why we can do a spread operator here and because we just spread out these 56 00:05:30,480 --> 00:05:32,850 properties into our input field.