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

Internet connection and using then on the social-app branch (React) #103

Open
FREDVUNI opened this issue May 3, 2023 · 0 comments
Open

Comments

@FREDVUNI
Copy link

FREDVUNI commented May 3, 2023

  • You need to be connected to the internet in order to use react-query.
  • You may also encounter issues when you use then when fetching data, To fix this you can use async instead.

something like this:
const { isLoading, error, data } = useQuery( ["user", currentUser.id], async () => { const response = await makeRequest.get("/users/find/" + userId); return response.data; } );

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

No branches or pull requests

1 participant