question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to debounce asynchronous searches

See original GitHub issue

Although in general i’m agains incrementing the API surface of the component, I think this is a reasonable addition.

It’s possible to debounce searches by the user, but what would involve a double nested promise, while in the component side is trivial to implement.

Something on the line of debounceSearch=200 (time in milliseconds)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cibernoxcommented, Nov 9, 2015

I’ve just added an entry in the cookbook showing how to do this on the user’s end, which only takes a couple extra lines of code.

I hope that helps understand promises + debounce.

0reactions
corrsptcommented, Nov 9, 2015

@cibernox Thank you 👍 🎩

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use debounce on async function? - Stack Overflow
Lodash's debounce function takes in a function , time to wait and returns a function. So do it like this:
Read more >
debounce-async - npm
A debounced function that delays invoking asynchronous functions. Preliminaries. A debounced function groups sequential calls to a function ...
Read more >
Debounced function not awaiting async function #4815 - GitHub
After step 1: Search results matching search field at step 1 are shown ... delayedLastFmQuery = _.debounce(async function (q) { var ...
Read more >
Asynchronous Autocomplete Search with React, axios, and ...
Asynchronous Autocomplete Search with React, axios, and lodash debounce. Trying to showcase how to debounce API calls using _.debounce and axios in react....
Read more >
Debounce in JavaScript — Improve Your Application's ...
Implementing a debounce from scratch is a common interview question. It tests your understanding of intermediate and advanced JavaScript concepts such as: async...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found