From fc2ba214e8d069ef2cbca61b3f1f8349896174ad Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Wed, 6 May 2020 23:22:14 +0300 Subject: [PATCH] minor fixes --- .../09-call-apply-decorators/03-debounce/task.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/06-advanced-functions/09-call-apply-decorators/03-debounce/task.md b/1-js/06-advanced-functions/09-call-apply-decorators/03-debounce/task.md index 46924b8f..2215073a 100644 --- a/1-js/06-advanced-functions/09-call-apply-decorators/03-debounce/task.md +++ b/1-js/06-advanced-functions/09-call-apply-decorators/03-debounce/task.md @@ -26,9 +26,9 @@ setTimeout( () => f("c"), 500); ``` -Now a practical example. Let's say, the user types something, and we'd like to send a request to the server once they're finished. +Now a practical example. Let's say, the user types something, and we'd like to send a request to the server when the input is finished. -There's no point in sending the request for every character typed. Instead we'd like to wait, and then process the whole result. The `debounce` decorator makes this easy. +There's no point in sending the request for every character typed. Instead we'd like to wait, and then process the whole result. In a web-browser, we can setup an event handler -- a function that's called on every change of an input field. Normally, an event handler is called very often, for every typed key. But if we `debounce` it by 1000ms, then it will be only called once, after 1000ms after the last input.