NeoFox
NeoFox
TTCTheo's Typesafe Cult
Created by Hampterultimate on 3/25/2024 in #questions
Issues with queryKey
Not sure if this would help but I use dynamic query keys like this:
const ticket: UseQueryResult<TicketInfo> = useQuery({
queryKey: ["getTicketInfo", ticketId],
queryFn: () => getTicketInfo(ticketId),
enabled: ticketId != undefined && session.data?.id != undefined,
})
const ticket: UseQueryResult<TicketInfo> = useQuery({
queryKey: ["getTicketInfo", ticketId],
queryFn: () => getTicketInfo(ticketId),
enabled: ticketId != undefined && session.data?.id != undefined,
})
And to only fetch based on a condition you can use the
enabled
enabled
attribute
5 replies
TTCTheo's Typesafe Cult
Created by NeoFox on 3/7/2024 in #questions
Undefined TypeScript error
I got to figure out all these typescript quirks lol
10 replies
TTCTheo's Typesafe Cult
Created by NeoFox on 3/7/2024 in #questions
Undefined TypeScript error
It worked thanks!
10 replies
TTCTheo's Typesafe Cult
Created by NeoFox on 3/7/2024 in #questions
Undefined TypeScript error
But i can just stick with //@ts-expect-error for now
10 replies
TTCTheo's Typesafe Cult
Created by NeoFox on 3/7/2024 in #questions
Undefined TypeScript error
No description
10 replies
TTCTheo's Typesafe Cult
Created by utdev on 1/9/2024 in #questions
Nextjs 14 build issue
It seems like its expecting the common js syntax. Its most likely an issue with eslint.
6 replies
TTCTheo's Typesafe Cult
Created by Cobain on 1/5/2024 in #questions
How to access files on production (Vercel deployment)
Since they are in the public folder you can get them on the root url: /docs/*mdx
3 replies