function
function
Explore posts from servers
TtRPC
Created by function on 9/23/2024 in #❓-help
Why not create queryClient and trpcClient outside of React?
I'm so goddamn stupid, i literally asked the same question this June already: <#1253685017931022347> And also they even explain this in the docs below the code snippet... I AM INCAPABLE OF READING 🤬
4 replies
TtRPC
Created by function on 6/21/2024 in #❓-help
Why are `new QueryClient` and `trpc.createClient` run inside a component in the React setup?
oh
25 replies
TtRPC
Created by function on 6/21/2024 in #❓-help
Why are `new QueryClient` and `trpc.createClient` run inside a component in the React setup?
ideally you'd want the the recommended setup to be secure and expressive on why it's made that way.
25 replies
TtRPC
Created by function on 6/21/2024 in #❓-help
Why are `new QueryClient` and `trpc.createClient` run inside a component in the React setup?
kind of a tough issue to solve in a way that's opaque to devs.
25 replies
TtRPC
Created by function on 6/21/2024 in #❓-help
Why are `new QueryClient` and `trpc.createClient` run inside a component in the React setup?
yeah, probably.
25 replies
TtRPC
Created by function on 6/21/2024 in #❓-help
Why are `new QueryClient` and `trpc.createClient` run inside a component in the React setup?
i mean, this makes sense, but the reason behind it is not obvious at all and some dev might do the mistake of having a global instance with SSR.
25 replies
TtRPC
Created by function on 6/21/2024 in #❓-help
Why are `new QueryClient` and `trpc.createClient` run inside a component in the React setup?
i guess you could theoretically disable caching on the server?
25 replies
TtRPC
Created by function on 6/21/2024 in #❓-help
Why are `new QueryClient` and `trpc.createClient` run inside a component in the React setup?
i think i understand
25 replies
TtRPC
Created by function on 6/21/2024 in #❓-help
Why are `new QueryClient` and `trpc.createClient` run inside a component in the React setup?
hmm SSR 🤔
25 replies
TtRPC
Created by function on 6/21/2024 in #❓-help
Why are `new QueryClient` and `trpc.createClient` run inside a component in the React setup?
xD
25 replies
TtRPC
Created by function on 12/26/2023 in #❓-help
How can i use inferprocedureoutput?
Seems like i actually need something like
type RouterOutputs = inferRouterOutputs<AppRouter>
UseTRPCQueryResult<RouterOutputs["foo"], TRPCClientErrorLike<AppRouter>>
type RouterOutputs = inferRouterOutputs<AppRouter>
UseTRPCQueryResult<RouterOutputs["foo"], TRPCClientErrorLike<AppRouter>>
but i don't understand why i need to pass TRPCClientErrorLike
4 replies
TtRPC
Created by function on 11/17/2023 in #❓-help
Globally handle specific Error type on backend
Ok, thanks a lot!
7 replies
TtRPC
Created by function on 11/17/2023 in #❓-help
Globally handle specific Error type on backend
Because i don't want to leak info to clients about errors i didn't define as DispatchableError.
7 replies
TtRPC
Created by function on 11/17/2023 in #❓-help
Globally handle specific Error type on backend
I'm not sure if errorFormatter is the right thing to use here because this is more of a info/security concern than a formatting one.
7 replies
TtRPC
Created by thomasplayschess on 9/13/2023 in #❓-help
Wrapping useQuery into a custom hook
nice!
74 replies
TtRPC
Created by function on 9/12/2023 in #❓-help
404 TRPCError: no query procedure on path
thanks
18 replies
TtRPC
Created by function on 9/12/2023 in #❓-help
404 TRPCError: no query procedure on path
it works now :)
18 replies
TtRPC
Created by function on 9/12/2023 in #❓-help
404 TRPCError: no query procedure on path
@thomasplayschess yeah the issue was simply that i tried localhost:4321/ instead of localhost:4321 as the URL for the link.
18 replies
TtRPC
Created by HoXsan on 9/13/2023 in #❓-help
is Nextjs enough as backend?
so purely from an API/backend kind of view you can think of next.js as similarly feature-filled as something like express.js.
9 replies
TtRPC
Created by HoXsan on 9/13/2023 in #❓-help
is Nextjs enough as backend?
you need to bring your own DB and auth integrations unless you're using a preset like T3 or other starter templates.
9 replies