Debounce

You can find an explanation of debouncing hereopen in new window.

In essence, debouncing merges frequently triggered events into one execution. For example, in an input event, the debounce function will only execute after the user has stopped inputting for a certain period of time.

VueRequest's debouncing is implemented using debounceopen in new window provided by lodashopen in new window.

You can customize the behavior of debounce using debounceOptions.

As shown below, you only need to provide a debounceInterval to tell us the interval of debouncing. In this way, we will only initiate a request after the user has stopped inputting for 300 milliseconds.

You can open the console to see the interval of console output.

Last Updated: 7/6/2023, 3:23:08 AM
Contributors: John