1 00:00:00,990 --> 00:00:05,650 In this part, we create a brand new portrait to talk about. 2 00:00:05,780 --> 00:00:05,930 We. 3 00:00:07,530 --> 00:00:08,410 So what you redux. 4 00:00:08,570 --> 00:00:12,190 We allow you to store your state in what they call it. 5 00:00:12,240 --> 00:00:16,430 We duck store and use Ethen to call that we deal with. 6 00:00:17,670 --> 00:00:21,660 So first we have to install the we does and we add redux. 7 00:00:23,890 --> 00:00:26,840 So we go to the terminal and use NPM 8 00:00:29,690 --> 00:00:30,350 install. 9 00:00:30,730 --> 00:00:32,630 We talked, we ate, we talked. 10 00:00:35,030 --> 00:00:37,200 So we go to the investment J. 11 00:00:37,340 --> 00:00:42,310 S And the first part is we are going to create a store. 12 00:00:43,700 --> 00:00:45,230 So we have to import 13 00:00:47,820 --> 00:00:57,350 a store from dance and then to create a store. 14 00:00:58,070 --> 00:01:03,650 We have to let store is equal to a store. 15 00:01:04,190 --> 00:01:06,890 And inside here we have two big a. 16 00:01:06,930 --> 00:01:07,700 We do, sir. 17 00:01:09,260 --> 00:01:13,430 But what we do to reduce our use, to transform the essence. 18 00:01:14,850 --> 00:01:16,960 We do so is to try form the state. 19 00:01:17,320 --> 00:01:22,090 Depends on the actions and actions are the instructions. 20 00:01:22,900 --> 00:01:23,810 What are we doing with us? 21 00:01:24,880 --> 00:01:26,770 So we have FEMA passing. 22 00:01:27,130 --> 00:01:32,220 One is this bill and the other, if the Aston's and the we do this. 23 00:01:32,620 --> 00:01:36,690 So we are going to create a Aston's would create a increment. 24 00:01:37,120 --> 00:01:46,480 And then we we turn to type increment and then we also create a big ribbon and B also named as Dickerman. 25 00:01:47,410 --> 00:01:52,330 And we do so, as we said before, is to transform the state. 26 00:01:52,330 --> 00:01:53,830 Depends on the actions. 27 00:01:53,950 --> 00:01:56,680 So there will be a switch case is. 28 00:01:57,160 --> 00:02:10,000 So we created we do with her or conter we deal with it is equal to say equal to zero and we set it to 29 00:02:10,000 --> 00:02:10,530 S.R.O.. 30 00:02:11,130 --> 00:02:15,700 If you that initial state and we also passed the action here. 31 00:02:18,710 --> 00:02:26,810 So we you look at the actions and we will see if it is increment, it will return each day plus one 32 00:02:27,870 --> 00:02:30,790 and our money will we turn to stay minus one? 33 00:02:32,130 --> 00:02:33,610 And in default, we would trust. 34 00:02:33,720 --> 00:02:35,190 We turn to Kerwin's day. 35 00:02:37,080 --> 00:02:42,150 So now we can pass this reducer to the store. 36 00:02:42,720 --> 00:02:48,760 So now we already have this ball to display to stay inside the console of the problems. 37 00:02:49,650 --> 00:02:52,800 We have to use the store pops, subscribe. 38 00:02:58,050 --> 00:03:01,120 And then we are going to dispatch to actions. 39 00:03:04,230 --> 00:03:05,880 Oh, we disparage the increment. 40 00:03:05,940 --> 00:03:14,090 And we are going to stop the server and there is something wrong that we forgot to check the type not 41 00:03:14,140 --> 00:03:14,380 checked. 42 00:03:14,510 --> 00:03:14,990 The extra. 43 00:03:15,680 --> 00:03:17,600 You are going to try that action, DOCTYPE. 44 00:03:18,240 --> 00:03:19,060 Now you can see the. 45 00:03:19,500 --> 00:03:20,490 Here is one. 46 00:03:21,360 --> 00:03:26,470 So it already can change this day by using the increment actions. 47 00:03:27,540 --> 00:03:30,170 And sometimes you will see it as pay low here. 48 00:03:31,920 --> 00:03:40,380 For example, we pass the values and then instead of using one we are going to using Eston thought a 49 00:03:40,410 --> 00:03:40,770 low. 50 00:03:41,400 --> 00:03:51,120 So now if we go back to here and we increment by five, you will see at this time where Aleo is five. 51 00:03:51,390 --> 00:03:53,700 So this is how the actions work. 52 00:03:54,630 --> 00:03:57,180 You can post the type and also the pay load.