peterkyle01
TTCTheo's Typesafe Cult
•Created by Draëcal on 11/1/2023 in #questions
Preact signals in Nextjs14 + AppRouter
U need to use the signal useEffect i think its called effect to render when signal changes the if you want to toggle signal true and false you can do:
toOpen.value = !toOpen.value
3 replies
TTCTheo's Typesafe Cult
•Created by IT on 10/27/2023 in #questions
Where Should I Place API Communication Files for OpenAI in a Next.js and tRPC T3 Stack?
I mostly use api routers for third party auth for example if i need to pass tokens in the request or some headers,i looked for where it was used i did not find it but it still shows what i say about passing some auth or keys in the request using api routes or also using them as middlewares.rRPC are for the rest like data fetching from db and all crud stuff.
6 replies
TTCTheo's Typesafe Cult
•Created by IT on 10/27/2023 in #questions
Where Should I Place API Communication Files for OpenAI in a Next.js and tRPC T3 Stack?
Just throw all api stuff under trpc server to have types,thats the beauty of trpc ,its like api routes but better
6 replies
TTCTheo's Typesafe Cult
•Created by Daniel K on 7/25/2023 in #questions
Where to store pictures? Gallery Page
You can use uploadThing or Firebase
9 replies
TTCTheo's Typesafe Cult
•Created by zsrobinson on 7/9/2023 in #questions
Wait for ISR Revalidation (rather than showing stale data)
Use redis ,after a value is fetched ,cache it everytime for a certain amount of time or local storage if its not that much data.
6 replies
TTCTheo's Typesafe Cult
•Created by dollahane23033 on 7/8/2023 in #questions
import mysql into planetscale
2 replies
TTCTheo's Typesafe Cult
•Created by batata on 7/8/2023 in #questions
Fetching only once
useEffect with reg ex for holding every url path on your app in the array of dependencies,and clean it up after render
4 replies
TTCTheo's Typesafe Cult
•Created by zsrobinson on 7/9/2023 in #questions
Wait for ISR Revalidation (rather than showing stale data)
just dont cache it,have the loading while the request is being fetched on page load
6 replies
TTCTheo's Typesafe Cult
•Created by ray1sx on 7/6/2023 in #questions
Experiencing hell while dealing with tRPC procedures and the "input needs to be an object"... help
Awsome ,thanks for the info 👌
14 replies
TTCTheo's Typesafe Cult
•Created by antoine on 7/7/2023 in #questions
need help with keepPreviousData in trpc client / tanstack query
You can use state untill we find a workaround that I did the same
10 replies
TTCTheo's Typesafe Cult
•Created by antoine on 7/7/2023 in #questions
need help with keepPreviousData in trpc client / tanstack query
What if we say isSearchUsersLoading || (isSearchUsersTyping && isSearchUsersFetching) to only show loading when the user is typing and data is being fetched
10 replies
TTCTheo's Typesafe Cult
•Created by antoine on 7/7/2023 in #questions
need help with keepPreviousData in trpc client / tanstack query
Can you try to introduce isLoading from react query then give it isSearchUsersLoading and then add it to the conditional check where you have isSearchUsersFetching and the others
10 replies
TTCTheo's Typesafe Cult
•Created by antoine on 7/7/2023 in #questions
need help with keepPreviousData in trpc client / tanstack query
That is the preferred solution for now, keeping the previous data in a state as you are doing
10 replies
TTCTheo's Typesafe Cult
•Created by web3moloh on 7/7/2023 in #questions
Nextjs request's order in async api
because you are in the case statement where the case of event is order updated the same event exists down the chain of promises,i think the process is right but its just the console logging that says otherwise because it is the same event at the top
6 replies
TTCTheo's Typesafe Cult
•Created by web3moloh on 7/7/2023 in #questions
Nextjs request's order in async api
Are promises not working,have you tried chaining one after the other
6 replies
TTCTheo's Typesafe Cult
•Created by zendev on 7/6/2023 in #questions
How to use Prisma model type in tRPC mutation w/ Zod
You can nest objects in zod like:
.input(
z.object({
art: z.object({
id:z.string(),
}),
creators: z.object({
id: z.string(),
//...like that
})
})
)
7 replies
TTCTheo's Typesafe Cult
•Created by ray1sx on 7/6/2023 in #questions
Experiencing hell while dealing with tRPC procedures and the "input needs to be an object"... help
Okay,also look at how you call the procedure from the client
14 replies
TTCTheo's Typesafe Cult
•Created by ray1sx on 7/6/2023 in #questions
Experiencing hell while dealing with tRPC procedures and the "input needs to be an object"... help
Okay, lemme know if you find it
14 replies
TTCTheo's Typesafe Cult
•Created by ray1sx on 7/6/2023 in #questions
Experiencing hell while dealing with tRPC procedures and the "input needs to be an object"... help
Can you try console logging the input before sending it to axios to see its state ,then try sending a plain object like { foo:"bar"} to axios and see if it works
14 replies