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