Data isn't being passed into function correctly
Super weird bug, I use a QueryFN to execute an API call. This is something I've done a million times before (in fact immediately below the code I am about to share, I run another few API calls that use extremely similar syntax.
I pass in two variables into the function, one called "appUrl" and another called "isApp" -- when I console.log them, they look how I want them to look... isApp is a bool that gets set correctly, appUrl is indicitive of what I want it to be too... then I call useQuery...
Here are the clientside logs for both isApp and appUrl. I log them immediately ABOVE useQuery.
It calls the following function
isApp is undefined. It's not undefined when I pass it in. appUrl logs this out:
What the heck is happening here? This makes absolutely zero sense.
My app is made up of 30+ API calls... I use this syntax time after time with no issues... please help! Thanks in advance!
I pass in two variables into the function, one called "appUrl" and another called "isApp" -- when I console.log them, they look how I want them to look... isApp is a bool that gets set correctly, appUrl is indicitive of what I want it to be too... then I call useQuery...
const info = useQuery(['info'], ()=>getInfo(appUrl, isApp), {onSuccess:(data)=> setResID(data.data[0].id)})Here are the clientside logs for both isApp and appUrl. I log them immediately ABOVE useQuery.
It calls the following function
isApp is undefined. It's not undefined when I pass it in. appUrl logs this out:
[Log] {queryKey: ["info"], pageParam: undefined, meta: undefined}What the heck is happening here? This makes absolutely zero sense.
My app is made up of 30+ API calls... I use this syntax time after time with no issues... please help! Thanks in advance!