1 00:00:02,230 --> 00:00:08,900 So over the last lectures, we introduced redux and we're managing all the core state of our application 2 00:00:08,900 --> 00:00:09,890 through it now. 3 00:00:10,120 --> 00:00:17,470 Well I'm in the orders container and we don't manage orders through it right now because orders really is related 4 00:00:17,470 --> 00:00:25,030 to asynchronous code and I want to handle fetching data and handling asynchronous actions with redux 5 00:00:25,030 --> 00:00:32,080 first in the next module before we also use redux on this therefore. The same is kind of true for the 6 00:00:32,080 --> 00:00:36,950 burger builder where previously we fetched the ingredients from the server, 7 00:00:37,000 --> 00:00:38,440 we're not doing this right now, 8 00:00:38,440 --> 00:00:42,720 we'll reintroduce this over the next lectures, over the next modules 9 00:00:42,820 --> 00:00:51,050 but what we are doing is managing the core ingredients through redux. What I also already mentioned is 10 00:00:51,410 --> 00:00:57,470 that for example in the contact data, we still have a lot of state in our state property, 11 00:00:57,470 --> 00:00:59,270 the whole form is inside there, 12 00:00:59,270 --> 00:01:01,370 the validity of our controls 13 00:01:01,460 --> 00:01:07,630 and I want to really highlight, you can manage all of that through redux, 14 00:01:07,760 --> 00:01:09,110 you can do that. 15 00:01:09,110 --> 00:01:16,120 You can dispatch an action on every keystroke the user does and put all that logic you have in that container 16 00:01:16,130 --> 00:01:24,890 here into redux so that you check the validity of controls in redux, that you update the form control 17 00:01:24,890 --> 00:01:29,210 values through redux, that you have redux for everything, 18 00:01:29,360 --> 00:01:31,510 you can absolutely do that, 19 00:01:31,700 --> 00:01:38,640 and if you want to do this, really depends on the style you want to have in your application. 20 00:01:39,650 --> 00:01:43,250 Do you want to have very lean components and containers? 21 00:01:43,460 --> 00:01:49,610 This one here obviously isn't, then you have to put everything into redux. Do you want to have the state 22 00:01:49,610 --> 00:01:53,590 management placed where it belongs? 23 00:01:53,720 --> 00:01:56,960 So say this really is UI state, 24 00:01:56,960 --> 00:01:58,520 it's only relevant in 25 00:01:58,550 --> 00:02:06,590 this component and shouldn't be affecting any other components, then you might keep it in this container 26 00:02:06,590 --> 00:02:07,280 here. 27 00:02:07,640 --> 00:02:11,920 So this is really something you have to decide, both is correct, 28 00:02:11,930 --> 00:02:18,380 it's certainly worth the exercise, the training to put all that state into redux with the knowledge 29 00:02:18,380 --> 00:02:19,770 you have thus far 30 00:02:19,850 --> 00:02:23,930 but for me, I'm happy with the current state of the application. 31 00:02:24,110 --> 00:02:30,590 I want to move on in the next course module by diving into some more advanced things about redux like 32 00:02:30,590 --> 00:02:36,770 handling asynchronous code and then coming back to this application to improve it even more.