Intervals (Time events)
Interval events (Timing functions in JavaScript) allow the user to periodically run APIs and DB queries. You can configure these by using the setInterval and clearInterval functions.


The setInterval() method executes a code snippet with a fixed time interval between the calls, i.e, it executes a trigger callback at a given interval. Here’s how you can use it while dynamically binding queries onto widgets:
setInterval(callbackFunction: Function, interval: number, id?: string)
// Example
setInterval(() => { }, 10000, "myTimer");


The clearInterval() function stops executing the trigger callback started with the setInterval method.
clearInterval(id: string)
// Example
Copy link
Edit on GitHub