T3 Roadmap? What would you recommend?
I recently landed an internship, and they use the T3 Stack. I already had experience with JS, React, and had briefly used Node.js with Express. Also I have decent database knowledge. I'm already learning Next.js 14, it hasn't been hard so far, but like I said, I haven't used Node.js too much, and my backend skills aren't good. Honestly I was mostly applying to Front-end positions, but got this Full-Stack one. The thing that is being hard for me the most is tRPC, I feel like I don't understand nothing. I haven't had too much time to watch videos or read documentation, so that's why I'm here, I need your best recommendations so I can understand this stack. Should I learn Node.js first? Jump right into tRPC? I'm using Prisma and PlanetScale, if that's important. But yeah, Back-end is what I struggle with the most, the only thing I really feel comfortable with is databases. Please give me your recommendations, and thank you!
19 Replies
Pair with someone on your team to create one api endpoint. If you’ve used Express for getting a request and sending a response, there’s not much to “get” about tRPC
On the client, tRPC is just React Query but with autocomplete.
hot take: if you have 2 weeks to spare, learn some Golang and build a couple APIs with it before you dive into nodejs/trpc/nextjs api folder. Golang is very minimalistic so you can get to practice very quickly, and it's great for learning "proper backend" that you will then be able to apply in TS
please get out.
@nyx (Rustular DevRel) @Anna | DevMiner (Rustular CCO) guys I genuinely don't get your reaction, I don't see how JokuVaan was toxic in any way to anyone here, they merely stated their opinion and adviced against my advice which I find completely fine
"it's a shit language to work with"
yeah, its a nice feedback
surely i did learn something from it
👍
I agree that what they wrote is not really constructive but 1) I fail to see how that's against the rules 2) there are better ways to call this out
So, should I learn React Query?
you'll need to understand it to be able to use tRPC effectively. I initially jumped straight into tRPC without having a solid grasp on what problems React Query solves and it wasn't fun
so ideally you'll want to build something (even if it's small) with React Query first
yea thats a good idea. i've been using it since v1 so i can't really point out any learning materials other than the docs. there's probably some good youtube materials
basically you should understand
- query is GET, mutation is POST
- pending / error / "has data" state
- queryKeys / how to invalidate queries from a mutation (trpc takes care of queryKeys for you behind the scenes, but its useful to understand)
- staleTime and gcTime (how to keep data around while it's not visible on screen so that the next navigation is instant)
- be aware the "infinite querys" exist for pagination but probably fine to never have tried them
- it has a million more things but the list above is fundamentally why it's useful
the "project" to become familiar with it is
- a super simple twitter clone. no need for user accounts etc. just a form.
- you can see a list of tweets and post new ones. posting a new one updates the list of tweets.
- you can click into a tweet to go to a page that is just that one. in there you can edit it. when you go back to the main list, the tweet should have the updated text without having to wait.
For any react query needs just read this: https://tkdodo.eu/blog/why-you-want-react-query
Why You Want React Query
Let's take a look at why you'd want a library like React Query, even if you don't need all the extra features it provides...
but beware that many of these concepts may be all chinese to you before you actually apply them, and it's completely normal
the tkdodo articles are excellent, but 99% of that stuff isn't necessary to start with
i would say im pretty good with RQ and i still learn new stuff from his articles constantly
I'm mostly referring to the TkDodo article series - its an invaluable source of information once you kinda know what you're doing, but they made next to 0 sense to me before I started building something with react query
That’s totally fair, my bad. The above helped me personally loads after reading their docs. It was like any questions I had from reading their docs and making a todo app were answered by that blog if that makes any sense
yea imo its good to remember approximately what the list of articles is, and then when you hit an issue you know where to look
for example i just built a view for analyzing trace data that can load in over a million traces. for smaller traces we just load in everything. for traces greater than xyz spans, we only load in their IDs, names, and start/end times, and then the details are in the side pane as soon as you click them. it prefetches on mouse hover so it still feels native even when we're cheating to save on RAM. implementing all the behaviour for the two different modes was like 30 lines of RQ. just unbelievable how powerful it is.
this would have been like 1000 lines of spaghetti code in the past
I suggest we move this discussion to #tech-discussion which seems to be a more appropriate place for it
@Bohdan @cje @Yiannis Thank you all for your recommendations! I'll be learning React Query first.
Theo had made a create t3 app tutorial as well before this latest one where he was using trpc. There is more around the web and cje has an amazing couple of videos diving into details on how exactly trpc works but I suggest that for later.