T
tRPC

useQuery always fetching when active on page

useQuery always fetching when active on page

Ttegarjagatgeni8/25/2023
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
LLiltripple_reid8/25/2023
you can disable refetchOnMount and refreshOnReconnect in the trpc/useQuery options
Ttegarjagatgeni8/26/2023
oh, okay thanks

Looking for more? Join the community!

T
tRPC

useQuery always fetching when active on page

Join Server