1 00:00:02,290 --> 00:00:09,700 With the adjustments of the last lectures, we got leaner reducer files. Generally, we split our actions 2 00:00:09,700 --> 00:00:16,570 and reducers across a lot of files and created a lot of boilerplate code here. For a small project as this 3 00:00:16,570 --> 00:00:16,970 one, 4 00:00:16,990 --> 00:00:23,160 this is clearly overkill but also it allows me to show you what you can do and that will become important 5 00:00:23,410 --> 00:00:25,510 as you build bigger applications. 6 00:00:25,540 --> 00:00:31,060 We'll already see some advantages in the burger builder app which we'll work on in the next course module 7 00:00:31,060 --> 00:00:32,280 again. 8 00:00:32,440 --> 00:00:39,610 I wanted to highlight these possible improvements or restructurings to allow you to write as lean and 9 00:00:39,610 --> 00:00:46,300 understandable reducers actions and react applications in general as possible. 10 00:00:46,300 --> 00:00:53,110 Now one other thing I want to quickly dive into is an alternative folder structure, 11 00:00:53,170 --> 00:00:59,110 now the folder structure really is something you can find styles of different approaches, 12 00:00:59,110 --> 00:01:04,360 the approach I chose in this course is the one you'll probably see the most often in react projects, 13 00:01:04,450 --> 00:01:09,760 it's quite good with the containers and components differentiation and then the store. 14 00:01:09,940 --> 00:01:16,480 Now as your store grows, you might add more and more action and reducer files and you'll notice that 15 00:01:16,480 --> 00:01:22,510 some of your reducer files refer to some container and other reducer files to another container. 16 00:01:22,510 --> 00:01:30,910 For that reason, in an alternative project structure, you could create a store subfolder in every container 17 00:01:31,270 --> 00:01:39,060 and then only add the reducer and the actions for that given container to that store. 18 00:01:39,100 --> 00:01:45,010 And if you had more containers, each container folder had a store folder, you wouldn't have that global 19 00:01:45,010 --> 00:01:50,560 store folder and you would have a lot of actions and reducers for each container which you then still 20 00:01:50,560 --> 00:01:54,140 combine together in your index.js file though. 21 00:01:54,160 --> 00:01:55,970 So this is an alternative, 22 00:01:56,050 --> 00:02:02,080 you can also mix that with a global store for some global or shared operations you might need everywhere, 23 00:02:02,460 --> 00:02:08,240 that really is something you can fine tune and where you can read a lot of articles with a lot of opinions. 24 00:02:08,440 --> 00:02:11,950 Find the approach you like, for many projects, 25 00:02:11,950 --> 00:02:16,800 the approach shown here with a central store folder should be fine 26 00:02:16,870 --> 00:02:20,810 but be aware that you're free to deviate from that when needed.