halfmoon
halfmoon17mo ago

useQuery always fetching when active on page

Hi, I was call my procedure like this, using NextJs (page directory) const { isLoading, isError, isSuccess, data } = api.company.getAllAttendanceSettings.useQuery(); but the log always running.. how to prevent this query to always fetching? thanks
No description
2 Replies
Liltripple_reid
Liltripple_reid17mo ago
you can disable refetchOnMount and refreshOnReconnect in the trpc/useQuery options
halfmoon
halfmoonOP17mo ago
oh, okay thanks

Did you find this page helpful?