Skip to content

Question: How can I abort a query already in progress? #212

Description

@Dastari

Is there any way to abort a useQuery that is in progress?

I have a map that queries data based on the bounding coordinates of the current window. Data fetch times can be a few seconds but if the user rapidly moves around I want to be able to cancel the last request made in favor of the new query.

I do use throttling and checking the loading state of the useQuery however this just prevents new queries being executed concurrently. This is fine but it leaves me with waiting for data from the original useQuery to finish before I can do anything else.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions