tRPCttRPC
Powered by
peternovakP
tRPC•3y ago•
16 replies
peternovak

Usage of useQuery after pageload?

Hi all!
I am new to TRPC so my apologies in advance for a very nooby question: In my [id].tsx file I would like to use the 'id' parameter in my query. Since that takes a fraction of a second to load, I get an unhanded runtime error. What is the proper way to first call my query once the 'id' parameter has been identified, or for that matter later on when the user does something on the page?
image.png
image.png
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Prefetch and useQuery usage on tRPC 11 and NextJS 15
yektaYyekta / ❓-help
13mo ago
useQuery context
Answer OverflowAAnswer Overflow / ❓-help
3y ago