halfmoon
halfmoon15mo 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_reid15mo ago
you can disable refetchOnMount and refreshOnReconnect in the trpc/useQuery options
halfmoon
halfmoonOP15mo ago
oh, okay thanks