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!
3 Replies
Brendonovich
Brendonovich2y ago
You should be able to use undefined as the first arg, I think it's the only value assignable to void
Neto
Neto2y ago
Yes, undefined as the first parameter is the correct way of "ignoring" it
Cody
CodyOP2y ago
Great, worked a treat. Thanks so much guys!
Want results from more Discord servers?
Add your server