mutation taking a long time to appear after prefetching query
Hello,
I'm am currently having an issue where if my
I am using nextjs loading.tsx which is how the loading animation works, so as soon as the loading animation is gone it means that TRPC data has finished fetching, so the error message should be appearing instantly?
In the below server component you can see I am using
Server component:
client component:
I'm am currently having an issue where if my
isCaptchaValid endpoint errors (using throw new TRPCError(...)) the error message takes a long time to come through, it appears that it is linked to the endpoints execution time, as if I add some code to wait 2 seconds before executing it dramatically increases the time it takes for the error to come back. I am using nextjs loading.tsx which is how the loading animation works, so as soon as the loading animation is gone it means that TRPC data has finished fetching, so the error message should be appearing instantly?
In the below server component you can see I am using
prefetch and in the client component you can see I am using useQuery, which should not be refetching on first render since I used prefetch function.Server component:
client component: