tRPCttRPC
Powered by
MightyBossM
tRPC•3y ago•
8 replies
MightyBoss

Stuck trying to utilize useQuery to fetch some data on form submission

I'm trying to call a procedure in trpc through the use of useQuery in react upon form submission. So essentially I want to send the form data to the procedure then have it return some information. I'm not sure where to start on this. Does anyone have some guidance or a very basic example that could point me in the right direction?

Im currently doing something similar with useMutation but in this case im actually changing data in the db. I can just utilize useMutation here to fetch the information I need, however this doesn't seem like its really the right way to approach this. Would love some insight on how to handle this properly. Thanks
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

useQuery hook modify data on fetch.
MajMMaj / ❓-help
3y ago
useQuery caching data
НиткаННитка / ❓-help
2y ago
[How To?] Create a record in database on form submission...
LaunchThat.AppLLaunchThat.App / ❓-help
3y ago