1 00:00:00,150 --> 00:00:06,930 We're almost ready connecting our application to our readers, and then, of course, once we do that, 2 00:00:06,930 --> 00:00:13,230 our functionality in the register is going to get way more complicated than that, because, of course, 3 00:00:13,230 --> 00:00:18,990 then we're going to actually deal with our court, whether that's increase, decrease, remove or clear 4 00:00:18,990 --> 00:00:19,650 the card. 5 00:00:20,070 --> 00:00:25,380 And in order to do that, I would want to do a bit more changes in the images. 6 00:00:25,890 --> 00:00:29,350 So I would want to start by changing my initial story. 7 00:00:29,700 --> 00:00:33,090 So this was all good while we were practicing on the redux. 8 00:00:33,430 --> 00:00:39,160 But then, of course, for our app, the initial store or initial state will be different. 9 00:00:39,510 --> 00:00:41,590 So what is going to be our initial state? 10 00:00:41,910 --> 00:00:48,780 Well, we're going to have a court property and the value will be our hardcoded card items. 11 00:00:48,990 --> 00:00:55,790 Again, just to recap, card items was an array and then each and every item was an object. 12 00:00:56,120 --> 00:01:02,610 And at the moment what we're doing is we're just bypassing that and passing it directly in the card 13 00:01:02,610 --> 00:01:07,250 container where we have a card prop and then we set it equal to card items. 14 00:01:07,530 --> 00:01:14,520 But of course, what I want to do is access the card in my card container using the reader. 15 00:01:14,940 --> 00:01:19,740 So in my initial store, the card property will be equal to my card items. 16 00:01:19,890 --> 00:01:21,270 So that will stay the same. 17 00:01:21,550 --> 00:01:23,520 And then there's going to be two more properties. 18 00:01:23,910 --> 00:01:30,090 We're going to have eight total property and initially it will be set zero as well as the amount. 19 00:01:30,450 --> 00:01:36,510 So what is the initial amount of items in a card which also will be zero? 20 00:01:36,840 --> 00:01:38,160 I will save this. 21 00:01:38,400 --> 00:01:45,390 And then of course, at the moment I do have my not a number because my producer is still counting on 22 00:01:45,390 --> 00:01:47,940 account property that is no longer there. 23 00:01:47,970 --> 00:01:52,020 And that's why we will not dispatch any more from the objets. 24 00:01:52,260 --> 00:01:56,220 We also don't really care about the state in here. 25 00:01:56,610 --> 00:02:03,890 And then I also want to clean up my number and my producer, sorry, and producer for the time being. 26 00:02:03,900 --> 00:02:08,340 Let's start from the scratch and we're just going to return the state. 27 00:02:08,640 --> 00:02:14,250 And the last thing that I would want to fix is the nav bar, where I'm not going to be passing props 28 00:02:14,400 --> 00:02:15,110 this way. 29 00:02:15,300 --> 00:02:19,620 Again, we will use a redox to access our values directly. 30 00:02:19,800 --> 00:02:21,960 So let me delete the prop then. 31 00:02:21,960 --> 00:02:26,130 Also, let me look for my number and I'm not passing any more. 32 00:02:26,130 --> 00:02:30,720 The card that was just test out the geth state function. 33 00:02:30,930 --> 00:02:36,870 The structuring also needs to go and I'm going to change it back to hardcoded value of zero. 34 00:02:37,320 --> 00:02:44,490 I won't need any more to decrease and increase from the actions since we're going to set it differently 35 00:02:44,730 --> 00:02:46,080 using the redox. 36 00:02:46,200 --> 00:02:53,490 And once we have cleaned up our application, we are ready to connect our application to Radix to display 37 00:02:53,490 --> 00:03:01,350 our items and also access the properties and set up a more sophisticated functionality in our producer.