antoine
antoine
TTCTheo's Typesafe Cult
Created by antoine on 3/18/2024 in #questions
undefined `direction` for useInfiniteQuery
nevermind, seems to be fixed in the latest v11 beta
3 replies
TTCTheo's Typesafe Cult
Created by antoine on 8/8/2023 in #questions
extending trpc middleware
I just ended up extending an existing procedure since it was less variables to name. As far as I know, with unstable_pipe you don't get the input type from a ProcedureBuilder if you want the type before extending middleware. I didn't have a specific use case for unstable_pipe as shown in the docs so I didn't use it
4 replies
TTCTheo's Typesafe Cult
Created by antoine on 9/6/2023 in #questions
setting state param in nextauth
my attempt:
Auth0Provider({
...,
token: {
params: {
url: env.AUTH0_ISSUER + "/oauth/token",
state: btoa(
JSON.stringify({
key: "val",
})),
},
},
}),
Auth0Provider({
...,
token: {
params: {
url: env.AUTH0_ISSUER + "/oauth/token",
state: btoa(
JSON.stringify({
key: "val",
})),
},
},
}),
error message:
{
...,
message: 'state mismatch, expected 'something', got: 'something else'
}
{
...,
message: 'state mismatch, expected 'something', got: 'something else'
}
3 replies
TTCTheo's Typesafe Cult
Created by antoine on 7/7/2023 in #questions
need help with keepPreviousData in trpc client / tanstack query
I don't trigger a fetch until I stop typing, so I want to show Loading... when I'm typing for the first time no matter the case. Then if I have results from a fetch, I don't want to show Loading... anymore as I keep typing to update results. That's why I check the length of the results to prevent Loading... from flashing when I keep typing.
10 replies
TTCTheo's Typesafe Cult
Created by antoine on 7/7/2023 in #questions
need help with keepPreviousData in trpc client / tanstack query
it's flashing because foundUsers.length === 0 is true when it's refetching
10 replies
TTCTheo's Typesafe Cult
Created by antoine on 7/7/2023 in #questions
need help with keepPreviousData in trpc client / tanstack query
tried it, still flashing Loading...
10 replies