We are definitely able to save our list of cells, but right now we are saving with every single key
press, which is definitely not ideal.
So to limit the number of requests we make, we're going to add in a little bit of bouncin logic, the
same kind of bouncin logic that we've already set up several times throughout this course.
Back inside my middle, where I'm going to find our save cells call and we're going to wrap that with
a simple set time out.
I'm then going to put a timer on there of two hundred and fifty milliseconds.
Will then receive the timer that we get back and assign it to a variable of a timer.
You'll notice I'm not declaring with the left or right there, I'm going to instead declare that variable
right inside the body of our uppermost function.
The right there.
I'm going to put in a timer and I'm going to annotate it as any just to get around some little known
just as she was or some, I really should say, some issues around typing a timer with TypeScript.
Then right above where we set up our timer, we'll say that if we ever dispatch an action again or end
up inside this statement again within those 250 milliseconds, then we will clear the existing timer
that was already set up.
So if we already have a timer, let's clear time out with that timer.
All right, I'm not going to go much more into this bouncing logic than that because, of course, we've
gone through these bouncing quite a bit throughout this course.
Let's just go ahead, flip back over to our browser and make sure this works as expected.
I should now be able to flip back over, refresh and then type inside of this code, sell a whole bunch.
And then only after I stop for two hundred fifty milliseconds should we see a post request issued.
Same thing for moving cells around.
If I start to move stuff around only after 250 milliseconds should I see that post request issued tempting
for tech cells.
So type.
Type type.
Eventually stop and there's the safe.
And now, of course, if I refresh, I should see all the same content on the screen.
Well, I'd say that looks pretty good.
So at this point time, I'm pretty happy with our application, how it stands right now.
So let's pause right here and then start to work on the deployment off to NPM of our Seelie in just
a moment.