1
00:00:01,170 --> 00:00:05,230
We are definitely able to save our list of cells, but right now we are saving with every single key

2
00:00:05,250 --> 00:00:07,170
press, which is definitely not ideal.

3
00:00:07,620 --> 00:00:12,000
So to limit the number of requests we make, we're going to add in a little bit of bouncin logic, the

4
00:00:12,000 --> 00:00:15,360
same kind of bouncin logic that we've already set up several times throughout this course.

5
00:00:15,960 --> 00:00:22,230
Back inside my middle, where I'm going to find our save cells call and we're going to wrap that with

6
00:00:22,230 --> 00:00:24,390
a simple set time out.

7
00:00:30,060 --> 00:00:33,630
I'm then going to put a timer on there of two hundred and fifty milliseconds.

8
00:00:34,790 --> 00:00:38,330
Will then receive the timer that we get back and assign it to a variable of a timer.

9
00:00:38,660 --> 00:00:43,310
You'll notice I'm not declaring with the left or right there, I'm going to instead declare that variable

10
00:00:44,030 --> 00:00:46,790
right inside the body of our uppermost function.

11
00:00:47,360 --> 00:00:48,050
The right there.

12
00:00:48,050 --> 00:00:52,940
I'm going to put in a timer and I'm going to annotate it as any just to get around some little known

13
00:00:52,940 --> 00:00:57,860
just as she was or some, I really should say, some issues around typing a timer with TypeScript.

14
00:01:00,330 --> 00:01:05,519
Then right above where we set up our timer, we'll say that if we ever dispatch an action again or end

15
00:01:05,519 --> 00:01:10,620
up inside this statement again within those 250 milliseconds, then we will clear the existing timer

16
00:01:10,620 --> 00:01:11,440
that was already set up.

17
00:01:12,030 --> 00:01:16,710
So if we already have a timer, let's clear time out with that timer.

18
00:01:19,620 --> 00:01:23,610
All right, I'm not going to go much more into this bouncing logic than that because, of course, we've

19
00:01:23,610 --> 00:01:25,800
gone through these bouncing quite a bit throughout this course.

20
00:01:26,100 --> 00:01:29,730
Let's just go ahead, flip back over to our browser and make sure this works as expected.

21
00:01:30,690 --> 00:01:36,360
I should now be able to flip back over, refresh and then type inside of this code, sell a whole bunch.

22
00:01:36,360 --> 00:01:41,070
And then only after I stop for two hundred fifty milliseconds should we see a post request issued.

23
00:01:41,850 --> 00:01:43,230
Same thing for moving cells around.

24
00:01:43,500 --> 00:01:49,590
If I start to move stuff around only after 250 milliseconds should I see that post request issued tempting

25
00:01:49,590 --> 00:01:50,490
for tech cells.

26
00:01:50,520 --> 00:01:51,000
So type.

27
00:01:51,000 --> 00:01:51,510
Type type.

28
00:01:52,370 --> 00:01:54,710
Eventually stop and there's the safe.

29
00:01:56,050 --> 00:01:59,760
And now, of course, if I refresh, I should see all the same content on the screen.

30
00:02:00,620 --> 00:02:02,240
Well, I'd say that looks pretty good.

31
00:02:03,210 --> 00:02:06,620
So at this point time, I'm pretty happy with our application, how it stands right now.

32
00:02:08,039 --> 00:02:12,690
So let's pause right here and then start to work on the deployment off to NPM of our Seelie in just

33
00:02:12,690 --> 00:02:13,130
a moment.

