1
00:00:00,850 --> 00:00:07,210
So now we can see how to implement them from Bousquet functionality, so similarly, as we did to add

2
00:00:07,210 --> 00:00:12,490
to basket will be creating a removable basket function and then send it to the type that will get all

3
00:00:12,490 --> 00:00:13,660
in the reduced reflector.

4
00:00:14,050 --> 00:00:14,680
So we'll do that.

5
00:00:15,340 --> 00:00:16,610
We have to go to check checkout product.

6
00:00:17,350 --> 00:00:17,820
Yes.

7
00:00:17,980 --> 00:00:18,210
Yeah.

8
00:00:18,550 --> 00:00:20,200
So one simply can't remove the basket.

9
00:00:22,300 --> 00:00:26,530
And look, we should have a calling a function that is remove from some basket.

10
00:00:36,040 --> 00:00:39,010
So I can create the functionality that I have to import the next set of things.

11
00:00:49,030 --> 00:00:49,990
From state provided.

12
00:00:51,950 --> 00:00:57,410
It is a boilerplate code will get you straight whenever, like when you start building one or two project

13
00:00:57,410 --> 00:00:59,390
products, you'll get your strip quickly.

14
00:01:05,540 --> 00:01:09,020
So these are the basic process that will repeat whenever we want to do our functionality.

15
00:01:13,260 --> 00:01:16,560
So that will be spelled backwards and then get hold of the basket.

16
00:01:18,780 --> 00:01:19,920
And then the dispatch matter.

17
00:01:26,740 --> 00:01:32,580
So confident that we can get hold of the dispatch method when this function is that is remove that basket.

18
00:01:42,920 --> 00:01:45,320
It'll be a mess, but Britain.

19
00:01:46,860 --> 00:01:47,910
So that pipe will be.

20
00:01:50,780 --> 00:01:53,600
So I have to call the dispatch function.

21
00:01:57,480 --> 00:01:58,680
The tape will be off.

22
00:01:59,890 --> 00:02:00,850
Remove them basket.

23
00:02:08,740 --> 00:02:09,910
And then it will be very.

24
00:02:12,070 --> 00:02:14,600
So basically, to remove that basket, we need to send only diet.

25
00:02:14,920 --> 00:02:17,050
So based on idea, you can remove from the basket.

26
00:02:18,450 --> 00:02:23,790
So that is what we have to do inside, check out the desk and then the remaining quote will be dealing

27
00:02:23,790 --> 00:02:26,220
in their it and our guests, so we have to create a new guest.

28
00:02:31,270 --> 00:02:33,340
Gas will be removed.

29
00:02:34,990 --> 00:02:35,380
No.

30
00:02:39,040 --> 00:02:43,420
And then so one thing you have to remember when we are deleting an element by it.

31
00:02:43,900 --> 00:02:48,640
So for example, this as well specifically, so we are adding five elements to the basket.

32
00:02:49,390 --> 00:02:52,630
So when we click on one of them like removing the basket.

33
00:02:55,010 --> 00:02:56,420
Everything will get deleted, right?

34
00:02:57,930 --> 00:03:03,280
So one thing you can't remove from basket, everything will get deleted, since all the items that are

35
00:03:03,300 --> 00:03:06,030
present in the basket are of the same idea, everything will be deleted.

36
00:03:06,360 --> 00:03:13,170
So we want to see the I.D. that matches the action so that we will see what we have for our defense

37
00:03:13,170 --> 00:03:13,620
statement.

38
00:03:17,790 --> 00:03:25,350
So once we got into the remove that basketball creator cost variable index, if not the index.

39
00:03:27,130 --> 00:03:31,180
Step by step, but it.

40
00:03:38,880 --> 00:03:39,690
Find finding next.

41
00:03:43,500 --> 00:03:45,930
So basically, this will be helping us to find the next.

42
00:03:46,290 --> 00:03:48,930
So they next should be we will take the basket item.

43
00:03:55,330 --> 00:03:59,080
And it will return basket item, but it is equal strong action that.

44
00:04:20,840 --> 00:04:24,410
So we have got the index, so not really fair to let.

45
00:04:26,260 --> 00:04:26,980
New basket.

46
00:04:30,420 --> 00:04:31,770
The previous basket itself.

47
00:04:40,800 --> 00:04:42,870
Sophie, next is greater than or equal to zero.

48
00:04:50,590 --> 00:04:51,460
You bastard.

49
00:04:55,130 --> 00:04:55,520
That.

50
00:04:58,880 --> 00:04:59,480
Splice.

51
00:05:02,460 --> 00:05:09,720
So what this does is this place is a matter that began using the JavaScript objects, so basically to

52
00:05:10,350 --> 00:05:18,690
remove the index, the element with the index that we are sending over here and it will return in place

53
00:05:18,690 --> 00:05:19,890
will be true if we present one.

54
00:05:19,890 --> 00:05:23,310
That means the new box set will be updated after deleting the index.

55
00:05:24,750 --> 00:05:27,390
So this is what the index is greater than zero.

56
00:05:27,990 --> 00:05:31,170
If the index is not available like ends, we have put it an error rate.

57
00:05:31,170 --> 00:05:32,370
We have to do that at only.

58
00:05:34,050 --> 00:05:36,720
Now we have one cancelled out one.

59
00:05:44,080 --> 00:05:46,010
Like, can't remove product.

60
00:05:53,110 --> 00:05:53,920
Ideas.

61
00:05:56,280 --> 00:05:57,930
Can you send dollars in before next election?

62
00:06:00,750 --> 00:06:01,850
Action rotating.

63
00:06:05,880 --> 00:06:08,790
So this is the doctor project, we have these collaborators.

64
00:06:23,880 --> 00:06:25,930
And it's not enough basket.

65
00:06:33,660 --> 00:06:35,340
So this weekend it.

66
00:06:39,240 --> 00:06:42,720
And then we have to return the new basket, right?

67
00:06:42,990 --> 00:06:46,110
So I said the dispatch method is immutable.

68
00:06:46,110 --> 00:06:48,390
We have always done a complete new object.

69
00:06:49,960 --> 00:06:52,360
So I'll be returning the previous state.

70
00:06:54,810 --> 00:06:56,370
With Mascot, as many of us get.

71
00:07:04,290 --> 00:07:06,180
And then also, we have to give a default case.

72
00:07:08,260 --> 00:07:14,580
If nothing is like the default, though, it is a good programming practice that if it simply returns

73
00:07:14,680 --> 00:07:14,860
it.

74
00:07:18,560 --> 00:07:24,520
So with this, we can, but from the there's another, as expected, Poland or.

75
00:07:31,810 --> 00:07:33,070
Thanksgiving, I'd like if.

76
00:07:40,770 --> 00:07:43,230
So does it seem there that it is the naming mistake?

77
00:07:45,890 --> 00:07:47,090
Well, the Senate should go.

78
00:07:47,170 --> 00:07:48,050
Yeah, it is not.

79
00:07:48,680 --> 00:07:52,550
So now we can implement, we can see the functionality, whether it's working or not.

80
00:07:53,250 --> 00:07:55,580
Lindsey Sharp, I'm going to add those items to my basket.

81
00:07:57,070 --> 00:07:57,730
And go ahead.

82
00:07:58,470 --> 00:08:02,410
Like, I'm going to play one remove from basketball, as you can see in Baltimore, and the players

83
00:08:02,410 --> 00:08:11,200
get updated dynamically because as you can see inside subtotal jazz, this field as this is a state

84
00:08:11,200 --> 00:08:14,080
variable like it keeps on updating of rhythm dynamically.

85
00:08:14,320 --> 00:08:16,870
So basically, we are using the basket and then getting the data.

86
00:08:16,870 --> 00:08:19,990
So once we play country move the basket, the basket gets updated.

87
00:08:20,260 --> 00:08:23,710
So therefore that all the chain components also gets updated.

88
00:08:23,920 --> 00:08:25,210
So this is the beauty of the act.

89
00:08:25,210 --> 00:08:26,650
We can do everything in an easy way.

90
00:08:27,040 --> 00:08:29,560
So like this are not like basically what we have.

91
00:08:30,100 --> 00:08:35,860
It is that we created add to basket, remove from basket functionality and see the data gets updated

92
00:08:35,860 --> 00:08:38,230
dynamically using the data layer wherever needed.

93
00:08:38,890 --> 00:08:41,200
But as we can add elements to the basket.

94
00:08:42,630 --> 00:08:43,530
And then remove them.

95
00:08:44,130 --> 00:08:46,540
This place is working on neither item with action.

96
00:08:46,980 --> 00:08:49,130
And the next I.D. is getting deleted.

97
00:08:50,460 --> 00:08:53,730
Any move from basket, as you can see, everything is working simply fine.

98
00:08:54,330 --> 00:08:56,940
And also the element is getting a very dynamically so it is.

99
00:08:56,940 --> 00:08:57,960
We completed the.

100
00:08:58,980 --> 00:09:04,350
That state properties that we want to discuss to add the functionality to our pet and that we are left

101
00:09:04,350 --> 00:09:08,280
out with the log in which authentication to get signing and then deploying our app.

102
00:09:08,430 --> 00:09:11,220
So with this, we can see these things in the next coming radio.
