Axios VS. Fetch
#2825
Replies: 1 comment 1 reply
-
I can see multiple issues with your
I have an written an article to get a better understanding of how async functions work, maybe you want to give it a read? In the meantime, here is a fetch function with axios that should work:
or, without
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Describe the bug
There is no problem when I use fetch for infinite query, but the same request gives an error with axios.
To Reproduce
Expected behavior
The two functions fetchInfiniteUsers have the same output, but in axios, useInfiniteQuery gives an error lastPage is undefined after a few seconds that remain in Loading mode. But fetch works fine.
Desktop (please complete the following information):
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions