How to debounce / throttle with Svelte?
14:22 07 Sep 2017

So i currently have:

App.html

And get the error Uncaught TypeError: Expected a function at App.debounce. This comes from Lodash so it doesn't seem like the method from Svelte is being passed through.

Extra extra edit

Extra context for how i'm currently achieving it:

oncreate () {
  const debounceFnc = this.handleInput.bind(this)

  this.refs.search.addEventListener('input', debounce(debounceFnc, 300))
}
javascript svelte