Sz
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Sz on 12/13/2023 in #questions
Is it possible to pass access tokens to react server components?
How would the cookie be passed into the server component? I've been reading this article that states something similar as well by using routes api or middleware, but still a little confused as to how the react server component would be able to have access to the cookies or headers set from the routers or middleware
article in question: https://www.propelauth.com/post/5-common-pitfalls-with-server-components-in-next13-with-examples
4 replies
TTCTheo's Typesafe Cult
•Created by Sz on 12/12/2023 in #questions
Adding Custom Headers in trpc using local storage
Solved this issue by modifying the fetch method in the api.createClient
4 replies
TTCTheo's Typesafe Cult
•Created by Sz on 12/4/2023 in #questions
key paths for recursive nested types
Not necessarily, it's supposed to represent a generic object type that can have both nested objects and arrays
9 replies
TTCTheo's Typesafe Cult
•Created by Sz on 12/4/2023 in #questions
key paths for recursive nested types
It should be following this pattern of regex
^(functions)((\.[0-9]+)(\.(properties|items)))*
. The missing part here is that the ${number}.items
and ${number}.properties
can be repeated any number of times in any combination of the 29 replies
TTCTheo's Typesafe Cult
•Created by Sz on 12/4/2023 in #questions
key paths for recursive nested types
functions
| functions.${number}.items
| functions.${number}.properties
9 replies
TTCTheo's Typesafe Cult
•Created by Sz on 1/2/2023 in #questions
How to handle multiple react-query `Providers`?
Which leads me to think that maybe separating out the contexts may be more beneficial
7 replies
TTCTheo's Typesafe Cult
•Created by Sz on 1/2/2023 in #questions
How to handle multiple react-query `Providers`?
I did a bit more reading as well and came upon this thread on github that talks about explicitly having different contexts between packages
https://github.com/TanStack/query/issues/4681
7 replies
TTCTheo's Typesafe Cult
•Created by Sz on 1/2/2023 in #questions
How to handle multiple react-query `Providers`?
I've tried doing that, while TRPC does support passing in a custom
QueryClient
, when I try to pass in a custom QueryClient
into WAGMI, I get an error that says that the queryCache types are not the same7 replies
TTCTheo's Typesafe Cult
•Created by Sz on 1/2/2023 in #questions
How to handle multiple react-query `Providers`?
WAGMI provides their own custom context and ensures that all of their respective
useQuery
and useMutation
use that context7 replies