Skip to content

Debounce? Throttle requests? #110

Description

@watadarkstar

I'd like to debounce the request for the auto-suggestion example in this repository. So when a user types a search term, it waits 3000 ms before it fires a network request on the search term.

I'm not really sure how to do this with useSWR and I was wondering if there is a way to throttle / debounce the requests?

Example from repo:
https://github.com/zeit/swr/blob/master/examples/autocomplete-suggestions/pages/index.js

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions