Internet connection and using then on the social-app branch (React)
FREDVUNI opened this issue · comments
Fred Vuni commented
- 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; } );