Varich
Varich
TtRPC
Created by Varich on 10/5/2024 in #❓-help
automatically add current path to the useQuery
Is there a way and how to add the current url(path) when call useQuery or useMutation, so that the current path is also being sent to the backend everytime. I think modify TRPCReactProvider might be useful, but that seem to be only evaluate once and not changing according to the page. My use case is that I'm doing /org/[orgname] and I want the orgname to be send to the backend everytime.
2 replies
TtRPC
Created by Varich on 2/7/2023 in #❓-help
basequery state changing cause infinite rerender
5 replies
TtRPC
Created by Varich on 11/16/2022 in #❓-help
save return type to type var
6 replies
TtRPC
Created by Varich on 11/13/2022 in #❓-help
Mutation with react-hook-form
Hello I'm trying to use mutation with react-hook-form. In the form, I will have to give interface of the input that I want, so I'm wondering whether it's possible to get the type of input to some mutation from trpc and pass it as input type.
4 replies
TtRPC
Created by Varich on 10/26/2022 in #❓-help
Making input to trpc route from Prisma generated type
Hello everyone, I want to make my TRPC update route generic and type safe. I already have all prisma setup. Would it be possible for me to reuse prisma generated type as the input and converted it to zod object automatically? I am trying not to copy myself and make it dynamic for future changes Thanks!
3 replies