#Noobie question

1 messages · Page 1 of 1 (latest)

deep jacinth
#

put them in useEffect:

useEffect(() => {
    if (isLoading) {
      console.log('isLoading');
    }

    if (isError) {
      console.log('error');
    }

    if (isSuccess) {
      console.log('isSuccess');
    }
  }, [isSuccess, isError, isLoading]);
true sequoia
#

i did, still this didn't work 😦

#

if I add the data though

const {
isSuccess,
isLoading,
isError,
data,
refetch: fetchActivePlans
} = useQuery({

I get the response

#

is it suppose to work with useEffect if you perform such an action?

deep jacinth
reef hinge
#

Use the query devtools!

true sequoia
#

thanks I will have a look!