1 00:00:00,390 --> 00:00:06,700 The major use of the use court back is to be aware and to focus on recreate created even though it is. 2 00:00:06,700 --> 00:00:09,620 It should not be rebranded to demonstrate base. 3 00:00:09,630 --> 00:00:13,980 We are going to be a tool conquerors and also to increment functions. 4 00:00:14,070 --> 00:00:18,170 So first we are going to add that use callback and also they use state 5 00:00:22,920 --> 00:00:26,940 and we do not need the logo and also DDT unnecessary code. 6 00:00:27,180 --> 00:00:32,080 And then we are going to create a two state about the to conquer. 7 00:00:32,400 --> 00:00:32,910 One is 8 00:00:36,020 --> 00:00:37,820 Tong the other set com. 9 00:00:38,070 --> 00:00:45,600 And then the U.S. State we said that initial state is zero and then we duplicate and we set to come 10 00:00:45,600 --> 00:00:47,380 to and second two. 11 00:00:47,580 --> 00:00:55,260 And then we create a function this one needs a increment one each the increment to increment the Congo 12 00:00:55,260 --> 00:00:58,270 one and the other is increment 2. 13 00:00:58,350 --> 00:01:02,190 And this is going to start the come to buy one. 14 00:01:02,250 --> 00:01:10,050 Now we are going to add a very simple UI that can display these count and come to and also the on tech 15 00:01:10,080 --> 00:01:18,630 functions to trigger the increment and also days increment to to increase the contact to so we can pass 16 00:01:18,630 --> 00:01:22,600 on the website by using NPM stock. 17 00:01:23,010 --> 00:01:25,670 We should use the second to here. 18 00:01:26,160 --> 00:01:35,070 So we may try the website both of them can increase the number by 1 but actually there is some problems. 19 00:01:35,850 --> 00:01:42,780 If you care about the performance because actually these two functions is we created even those like 20 00:01:43,260 --> 00:01:46,770 you are passing increment to the increment one functions. 21 00:01:46,770 --> 00:01:51,100 We have stated we created in order to take a look. 22 00:01:51,100 --> 00:02:01,470 On this we are going to create a new set but by the way location set actually set is similar to a way 23 00:02:01,670 --> 00:02:04,070 but we cannot have duplicate element. 24 00:02:04,070 --> 00:02:12,440 For example we create the my set is equal to do that and then we can add the element. 25 00:02:12,540 --> 00:02:20,460 Nope I put it by ad like we can add 60 and we can add 50. 26 00:02:20,640 --> 00:02:30,270 You can add anything even objects like you can add the name is we add but there is problem when you 27 00:02:30,270 --> 00:02:32,040 add the 50. 28 00:02:32,200 --> 00:02:36,970 If we will not at this because we already have 50 these elements. 29 00:02:37,230 --> 00:02:40,380 But we can add five. 30 00:02:40,380 --> 00:02:43,310 So this is they set. 31 00:02:43,320 --> 00:02:47,110 So now we are going to add the function is to the set. 32 00:02:47,280 --> 00:02:59,070 If this is we create it so we can type function in time to add increment and we can also add increment 33 00:02:59,070 --> 00:03:07,980 to add in order to let us know the name of the function we are going to use to call in so long. 34 00:03:08,580 --> 00:03:13,860 So this time we are going to use NPM 1 bill. 35 00:03:13,980 --> 00:03:24,990 Otherwise it will duplicate the console log but we forgot to add the console the function time to and 36 00:03:24,990 --> 00:03:31,630 then we run the NPM run build and then we copy this command and page it here. 37 00:03:31,740 --> 00:03:40,940 Then we pick on this consumer and we click on these functions to see when we first went to the website. 38 00:03:40,940 --> 00:03:47,110 It also creates these two functions that one is increment and the other is increment 2. 39 00:03:47,120 --> 00:03:53,180 But when we click on the Concord one the increment tool also we create it again. 40 00:03:53,390 --> 00:03:56,570 And as you can see we already set a set. 41 00:03:56,570 --> 00:04:01,580 We will not have duplicate but we have to increment 2. 42 00:04:01,580 --> 00:04:04,280 This is because this is a new function in this. 43 00:04:04,700 --> 00:04:09,770 So in order to increase the performance we should add that use call bad. 44 00:04:09,830 --> 00:04:21,280 For example we can use Corp add to optimize all functions and then we can let the fun just know that 45 00:04:21,940 --> 00:04:23,990 we only depends on cotton too 46 00:04:27,840 --> 00:04:34,750 and then we try to be a in them and we pass the increased tongue to it we'll created to see is very 47 00:04:34,750 --> 00:04:35,750 normal. 48 00:04:35,750 --> 00:04:43,150 And now when you compare two a days it only render the increment one rather than increment to. 49 00:04:43,320 --> 00:04:45,380 You can see the increment to. 50 00:04:45,390 --> 00:04:53,990 We will not be we created to make it clear we can pass keep pressing the count of one and we adjust 51 00:04:54,410 --> 00:05:01,650 the equator increment one rather than also weekly A.D. increment two. 52 00:05:01,670 --> 00:05:04,790 So this is how we use call bat use.