Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useFetch - options for gracefully refetching #2677

Closed
4 tasks done
jmroon opened this issue Jan 25, 2023 · 1 comment · Fixed by #2750
Closed
4 tasks done

useFetch - options for gracefully refetching #2677

jmroon opened this issue Jan 25, 2023 · 1 comment · Fixed by #2750
Labels
enhancement New feature or request

Comments

@jmroon
Copy link

jmroon commented Jan 25, 2023

Clear and concise description of the problem

When using useFetch, If you are writing to the url ref fairly quickly, there's no guarantee that the last url value in useFetch will be the one returned. You can test this fairly easily by quickly changing the url parameter on the useFetch page with refetch on:
https://vueuse.org/core/useFetch/

Since the requests can return out of order, you can run into issues where you get a 404 on a correct url or have the error become out of sync:

image
image

Suggested solution

Could this perhaps be addressed by allowing previous requests to be automatically aborted if the url value changes?

Alternative

No response

Additional context

No response

Validations

@jmroon jmroon added the enhancement New feature or request label Jan 25, 2023
@Alfred-Skyblue
Copy link
Member

Alfred-Skyblue commented Feb 10, 2023

resolved #2750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants