How to not pass first argument into useQuery
Hey guys, real quick one here. I have a useQuery I don't need to pass any input into as first argument, but want to specify stuff like onSuccess in second arg. I get an error on the first empty object arg "Argument of type '{}' is not assignable to parameter of type 'void'".
I probably should know how to fix this, but being a big TS noob Im a bit lost. It works fine, but would like to not have an error there for debugging purposes. Thanks!
![](https://utfs.io/f/51e40877-d140-429a-819c-a7a5a5aebd11-iylnko.50.46_pm.png)
3 Replies
You should be able to use
undefined
as the first arg, I think it's the only value assignable to void
Yes, undefined as the first parameter is the correct way of "ignoring" it
Great, worked a treat. Thanks so much guys!