JessesBeetShoppe
JessesBeetShoppe
TTCTheo's Typesafe Cult
Created by nocommas on 7/14/2023 in #questions
python and t3 stack
I'd probably just deploy a lambda with your python code and call it like you would a normal http endpoint, there isn't a super clean path for this type of integration with t3
10 replies
TTCTheo's Typesafe Cult
Created by Pranoy on 7/13/2023 in #questions
Confused with t3-stack
afaik pages is supposed to be supported for at least the next few major versions (ie, multiple years). It is still fully supported in next 13. I don't see them deprecating pages while the community is still so divided on app/
47 replies
TTCTheo's Typesafe Cult
Created by Pranoy on 7/13/2023 in #questions
Confused with t3-stack
I would recommend doing some reading about react server components and getting a sense of whether they're developed enough for your use case yet. When I tried them, the docs were lacking in detail and there were issues with things like pagination which was a dealbreaker for me at that time, so I have been using regular t3-stack. I'm not sure how far RSC's have come since then, maybe they feel more production ready but I also have no complaints about pages, so am personally just choosing to let the react team cook for a little longer before moving.
47 replies
TTCTheo's Typesafe Cult
Created by JessesBeetShoppe on 6/8/2023 in #questions
PII Data
I'll shoot you a DM now, much appreciated !
3 replies
TTCTheo's Typesafe Cult
Created by JessesBeetShoppe on 3/12/2023 in #questions
Disable Refetch on Focus in TRPC
The tool I'm making is for internal use for a small amount of people and the information isn't updated that often, it was just a bit annoying seeing requests firing off so often for no reason. thank you @ccccjjjjeeee that's exactly what i was after
12 replies
TTCTheo's Typesafe Cult
Created by chawnsphone on 3/12/2023 in #questions
Why can't I access array immediately after checking the index?
@Lubricashawn to fix this you can either change to gameBoard[rowIdx]![colIdx] or you can use matt pocock's new tool that address this and a couple of other typescript inconsistencies https://www.youtube.com/watch?v=bUts4HJJjV4&ab_channel=MattPocock
4 replies
TTCTheo's Typesafe Cult
Created by Simvolick on 3/4/2023 in #questions
tRPC and querying data from external api
it's a little counterintuitive that you pass args directly to useQuery but not useMutation, but that's just the way it is
45 replies
TTCTheo's Typesafe Cult
Created by Simvolick on 3/4/2023 in #questions
tRPC and querying data from external api
@Simvolick you are passing your arguments to useMutation, but you want to pass your arguments to useMutation().mutate(). useMutation() constructs your mutator, but to actually run the mutation you need to call .mutate(). so in your handleClick, change to api.gpt.gptMutate.useMutation().mutate({text: message})
45 replies
TTCTheo's Typesafe Cult
Created by Mendy on 3/5/2023 in #questions
How to structure pages and components for a simple web app using t3 stack?
@Mendy there are a lot of ways you can slice this, and i've heard people say things like "header components are dumb because you only need to use them once, so why make a reusable component when you can just make the header in layout.tsx?", but you might find it clearer to make a header component just so you know where all your header logic lives and so it doesn't clutter the rest of your layout.tsx (this is my preference). personally i also like to structure my apps in such a way where any calls to the backend are done in the files in the pages/ directory, then when the data is fetched it's passed into a component that constitutes most of the actual page content and lives in the components/ directory. I don't really like making API calls from within components as it's annoying to handle loading states etc that deep in the component tree. in terms of tables, pagination etc it depends on the amount of data your table is displaying. if it's not a huge amount of data, it might be appropriate to pull the entire db query you plan to display in one go and then handle pagination on the table level. As your data grows, it's more likely you'd want to grab a batch of the data and fetch more from the db as you paginate. it's still good to have more data pulled at any given time than you actually need to display so the user doesn't need to wait for data to come from the db on every pagination change. ultimately a lot of this comes down to preference and the design that's appropriate for your app. you might not need the most performant, optimized approach on your first build - I'd recommend just building as much as you can and rebuilding later, because you might find that some of your initial assumptions were entirely wrong (in this case, maybe you'll decide that tables overall are the wrong way to display the data - not saying it is, but anything could happen). building the thing shows you what you don't know.
6 replies
TTCTheo's Typesafe Cult
Created by Simvolick on 3/7/2023 in #questions
Any resources to learn the tRPC better? Hopefully with guides and examples?
honestly the way ct3a is structured is really good for learning TRPC and the v10 docs are pretty great, if you haven't bashed it until it works for at least a couple of weeks of experimenting maybe check out these other resources but I do think the best way to learn it is by building stuff with it and solving problems as you go
18 replies
TTCTheo's Typesafe Cult
Created by Lukem121 on 3/6/2023 in #questions
Vercel Timeouts 😶🌫 What can I do if I need longer server functions?
this might be a bit reductive, but also take a look at the code in your function and see if it can be optimized. I had this issue last week, but introducing parallel async/awaits in my code solved the problem without needing to use any additional or external services.
24 replies