// adds a listener for the container to the `input` event @watch(':inputElement.input') @debounce(100) protectedonInputQuery():void{ fetch('search.php?q='+encodeURIComponent(this.container.value)).then( resp=>{ this.state.suggestions=resp.json(); } ); }
Debounce and throttle decorators
Wraps a component method in [[Async.debounce]]. This makes it possible to reduce the load on 'heavy' functions. For example: