Does anyone have an example of a wrapper function / hook that returns hooks for mutations and queries? I'm thinking something similar to RTK where you can use the createApi function and inject endpoint, then return useThisMutation useThisQuery. It'd be nice to have a single file for each trpc router that calls the tanstack useQuery or useMutation, queryKeys defined in that same file also, not have to call the useTRPC and useQueryClient hooks in every component that makes a network request
#tRPC + Tanstackk Query Wrapper
5 messages · Page 1 of 1 (latest)
GitHub
This project provides a solid foundation for building modern web applications using a curated stack of technologies focused on developer experience, performance, and type safety. - CarlosZiegler/fu...
I see he builds pretty well, but hasn't switched to using the alpha branch yet.
Thank you! I'll check it out
Oh yeah, that's a method I was starting to implement. I guess I was on the right path