1
00:00:00,360 --> 00:00:00,750
All right.

2
00:00:00,750 --> 00:00:07,980
And the first additional feature I want to add to this app is a, the bounce option.

3
00:00:08,680 --> 00:00:13,390
Remember the search input where user can search for jobs.

4
00:00:14,110 --> 00:00:23,350
At the moment we prevent generating too many requests by waiting on is loading, which gets the job

5
00:00:23,350 --> 00:00:27,060
done but probably is not the best user experience.

6
00:00:27,070 --> 00:00:37,870
So instead we'll refactor our app to fire event basically to fetch our jobs only after a certain amount

7
00:00:37,870 --> 00:00:41,440
of time since the last keystroke.

8
00:00:41,890 --> 00:00:50,080
So imagine this user is typing, let's say in one second he or she typed five letters and only after

9
00:00:50,080 --> 00:00:52,750
the last letter was typed in.

10
00:00:52,750 --> 00:00:54,480
Let's say one second.

11
00:00:54,490 --> 00:00:56,980
After that we send a request.

12
00:00:56,980 --> 00:01:03,370
And don't worry if this kind of sounds iffy, you'll see as we start working on a feature.

13
00:01:03,370 --> 00:01:06,940
So we want to trigger something with DeLay.

14
00:01:07,540 --> 00:01:10,450
And the official name for that is the bounce.

15
00:01:11,050 --> 00:01:14,230
Now, a few important points before we begin.

16
00:01:14,530 --> 00:01:23,380
Since the bounce is a JavaScript feature, I will construct the initial function in vanilla JS So that

17
00:01:23,380 --> 00:01:27,860
one is kind of like watch only you won't have to participate.

18
00:01:27,880 --> 00:01:35,740
I'll just show you the general principles in Vanilla G's application and then we will come back to react.

19
00:01:35,740 --> 00:01:41,740
And then of course we'll set up the functionality and hopefully that way you have a better understanding

20
00:01:41,740 --> 00:01:43,570
of general principles.

21
00:01:44,430 --> 00:01:45,930
Of the the bones.

22
00:01:46,730 --> 00:01:50,870
Second, our bounce function is going to be very basic.

23
00:01:51,110 --> 00:01:58,100
You can definitely create a more complex one, but I just didn't see the point since this one gets the

24
00:01:58,100 --> 00:01:58,790
job done.

25
00:01:59,210 --> 00:02:04,580
And lastly, you don't always have to construct your own the bounce function.

26
00:02:04,910 --> 00:02:09,169
For example, the load library provides such function.

27
00:02:09,620 --> 00:02:12,860
So the only thing we need to do is important.

28
00:02:12,980 --> 00:02:15,650
However, I thought that the first time.

29
00:02:16,310 --> 00:02:23,390
We work on such a feature, it probably makes more sense to construct one from the scratch.

