1
00:00:01,450 --> 00:00:06,310
I am looking at my producer right now, right now we are just taking in whatever state we are provided

2
00:00:06,310 --> 00:00:07,680
and immediately returning it.

3
00:00:07,960 --> 00:00:10,120
So of course, that's probably not what we want.

4
00:00:10,450 --> 00:00:13,120
We're going to replace that with a switch statement.

5
00:00:13,670 --> 00:00:16,090
We're going to switch over action type.

6
00:00:17,340 --> 00:00:22,710
So that's going to be the type of the incoming action, so we'll set up different cases for all the

7
00:00:22,710 --> 00:00:26,390
different action types that we want to handle inside this reducer right now.

8
00:00:26,520 --> 00:00:29,630
We really want to handle every possible action type that we have to find.

9
00:00:30,000 --> 00:00:34,470
So inside of the reducer we are putting together, we really want to take care of each of these different

10
00:00:34,890 --> 00:00:35,430
cases.

11
00:00:37,360 --> 00:00:46,000
So I'm going to set up a case for each one will be action type, dot, update cell, and right now I'm

12
00:00:46,000 --> 00:00:47,830
going to put in just a simple return state.

13
00:00:48,770 --> 00:00:51,710
Case action type dot, delete cell.

14
00:00:57,210 --> 00:00:57,930
Mousel.

15
00:01:03,080 --> 00:01:05,540
And our last one is insert cell before.

16
00:01:07,770 --> 00:01:09,900
I'll then also add in our default case.

17
00:01:12,830 --> 00:01:17,330
OK, so there's a good start now, if we wanted to, we could definitely go through each of these different

18
00:01:17,330 --> 00:01:19,820
cases and start putting together some implementation.

19
00:01:20,180 --> 00:01:24,620
But remember, at this point in time, I think it's still just a little bit unclear what the big picture

20
00:01:24,620 --> 00:01:26,350
is of all of our reduc stuff.

21
00:01:26,690 --> 00:01:31,070
I think that we might want to start thinking about our different action characters as well and how those

22
00:01:31,070 --> 00:01:35,780
are going to come together before we spend any time putting together the actual implementation of each

23
00:01:35,780 --> 00:01:36,710
of these different cases.

24
00:01:37,320 --> 00:01:42,500
We should probably make sure that all those different assumptions that we made around the structure

25
00:01:42,500 --> 00:01:43,330
of our actions.

26
00:01:43,340 --> 00:01:47,060
So in other words, all these different interfaces we just wrote out, we should probably make sure

27
00:01:47,060 --> 00:01:49,010
that all these are reasonable assumptions first.

28
00:01:49,310 --> 00:01:54,170
And so that would require us to have to maybe do a little bit of work on our different action creators.

29
00:01:55,600 --> 00:01:59,440
So in other words, we're just going to hold off on a so right here, we're going to eventually come

30
00:01:59,440 --> 00:02:02,710
back and put in some additional implementation for each step.

31
00:02:04,100 --> 00:02:07,760
All right, so now that we've got a producer at a reasonable place, we'll take another pause right

32
00:02:07,760 --> 00:02:08,120
here.

33
00:02:08,150 --> 00:02:13,010
When we come back, the next video will create our actual reduc store inside the store file.

34
00:02:13,460 --> 00:02:18,850
We'll export it from our index dots file and then start wiring all this stuff up to the actual risk

35
00:02:18,920 --> 00:02:20,030
side of our application.

