For an explanation of debounce, you can find it hereopen in new window.
Simply put, it is to merge events that trigger very frequently into one execution. For example, for input events, the
debounce function will only be executed after the user stops typing.
debounceOptionsis provided after version 1.2.2 to customize the behavior of
As shown below, you only need to provide a
debounceInterval to tell us the debounce interval. In this way, 300 milliseconds after the user stops typing, we will initiate the request.
You can open the console to view the interval of the console printing information