createDebounced = (fn, delay = 3) => {
  let time = Date.now()
  return () => {
    const now = Date.now()
    if (now - time < delay) return false
    time = now
    fn()
    return true
  }
}
Performance optimized debounce without using setTimeout.
Returns a function which:
- will execute the passed fn not more than once per delay
- will not execute the passed fn if last try was within delay