Learn tRPC In 45 Minutes

  Рет қаралды 100,119

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Highlight: app.highlight.run/?promo=SIMP...
Coupon Code: SIMPLIFIEDHIGHLIGHT (This should be automatically filled in as you go through the signup process)
tRPC is an incredible library that makes working between your client and server so much nicer. The best part of tRPC is how it brings type safety to your API and client interactions which is something I have never seen done before (especially so well). In this video I talk about everything you need to know about tRPC.
📚 Materials/References:
What Is tRPC Video: • Is tRPC The End Of RES...
Zod Crash Course Video: • Learn Zod In 30 Minutes
🌎 Find Me Here:
My Blog: blog.webdevsimplified.com
My Courses: courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/WebDevSimplified
CodePen: codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
00:20 - Sponsor
01:22 - What Is tRPC
02:35 - tRPC Basic Usage
13:10 - Code Cleanup
15:23 - Routers
18:04 - Procedures
23:42 - Context
28:00 - Middleware
32:14 - Client
35:00 - Web Socket Subscriptions
#tRPC #WDS #JavaScript

Пікірлер: 103
@WebDevSimplified
@WebDevSimplified Жыл бұрын
Highlight: app.highlight.run/?promo=SIMPLIFIEDHIGHLIGHT Coupon Code: SIMPLIFIEDHIGHLIGHT (This should be automatically filled in as you go through the signup process)
@gzucca
@gzucca 5 ай бұрын
Man, I never get tired of your videos. Your explanations are so clear and to the point, plus they always have tips such as folder organization. Keep up the work!
@theisoj
@theisoj Жыл бұрын
Thanks once again Kyle for this tRPC tutorial. I'm going to learn about this on Friday or Saturday evening.
@StrayKev
@StrayKev Жыл бұрын
Thank you. tRPC is something I have always wanted to learn about.
@chrisfaux3769
@chrisfaux3769 Жыл бұрын
Thank you Kyle. tRPC was the part of the t3 stack I struggled the most this week and this video helped me so much. Would you mind making something like this about the t3 stack?
@clarkhinchcliff7824
@clarkhinchcliff7824 Жыл бұрын
Perfect, just when I needed it! Thanks so much for this.
@techwithattila
@techwithattila Жыл бұрын
Really interesting to see how many traditionally "backend concepts" break into the frontend world. It's a welcome change though, everyone is looking for less error-prone code 🐞
@SteveBoyer10
@SteveBoyer10 Жыл бұрын
Dude just been looking to learn this and boom, here's your video. Gracias sir.
@OtterSwims
@OtterSwims 4 ай бұрын
The last part about websockets was something i really needed, thanks for making this explainer.
@DavidBowmanJr
@DavidBowmanJr Жыл бұрын
I asked for this, and it happned. Thank you :)
@macctosh
@macctosh Жыл бұрын
very efficient tutorial.... love this style.
@stevepr7430
@stevepr7430 Жыл бұрын
Thanks, this video is the best support to tRPC docs.
@satvik0099
@satvik0099 7 ай бұрын
Your explanation is next level as usual ♥️🌟 But I request you to make a video of how to apply TRPC in real world applications . Also the application of web sockets is needed because without that it seems to be empty
@VladdyHell
@VladdyHell Жыл бұрын
It would be cool if you make a crash course for t3 stack too
@pablom2274
@pablom2274 8 ай бұрын
At min 16 coding along just amazed how good this is
@MattBodman
@MattBodman 2 ай бұрын
Excellent tutorial, thanks!
@nicolasbatistoni2036
@nicolasbatistoni2036 Жыл бұрын
Thanks! Great explanation!
@DYNO_619
@DYNO_619 10 ай бұрын
T3 stack tutorial needed!
@elonmask7271
@elonmask7271 Жыл бұрын
Was actually waiting for this. Thank you so very much.
@juanisimioli
@juanisimioli Жыл бұрын
Kyle, I need some solidity videos from you! ❤🧡💛💚💙💜
@alirashad23
@alirashad23 Жыл бұрын
that was so helpful for me thank you
@metalsadman
@metalsadman Жыл бұрын
thanks,. that's really cool way of doing things syncing frontend requests wiith serverside is godsend. i hope trpc gets more traction and adoption.
@jeromemanceau4263
@jeromemanceau4263 Жыл бұрын
Thanks Kyle!.. just wanted to also review Prisma and... look at that, you have a tutorial about Prisma as well :D
@Michael-Martell
@Michael-Martell Жыл бұрын
So, with this and the prisma course, are you leaning towards T3?
@firewatermoonsun
@firewatermoonsun 10 ай бұрын
Thank you so much buddy!
@navneetpatel6193
@navneetpatel6193 9 ай бұрын
Thankyou soo much Kyle.
@faizanahmed9304
@faizanahmed9304 Жыл бұрын
Wooo thanks man!
@eleah2665
@eleah2665 Жыл бұрын
Hi Kyle. Thanks for this. Is the code available somewhere? I don't see it in your github repository.
@MueezKhan1
@MueezKhan1 Жыл бұрын
Thanks! Thoughts on create-t3-app?
@farazayaz2526
@farazayaz2526 Жыл бұрын
❤ Love you man!
@hd.r6545
@hd.r6545 Жыл бұрын
Thank you for posting such great content! I learned a lot from all of your videos. They are really really helpful. And I am also shocked you can talk and code at same time keep everything on the track. Is there way to practice such ability ?
@ChristopherPhillipsDev
@ChristopherPhillipsDev 9 ай бұрын
He's got the ready made code on another monitor that he's already proofed. You can tell because he looks to the side before he writes something new.
@mediocreTyler
@mediocreTyler Жыл бұрын
Thanks Kyle
@ayushdedhia25
@ayushdedhia25 Жыл бұрын
I think tRPC can be the new standard for building APIs!! 🤔
@rukeeojigbo2221
@rukeeojigbo2221 7 ай бұрын
Thanks a lot
@rolandfancier3666
@rolandfancier3666 11 ай бұрын
thx for your tutorial~ but how can i get the demo you show in the video?
@mahboobmohammad1868
@mahboobmohammad1868 Жыл бұрын
Out of curiosity, why don't you use node --watch instead of nodemon
@AZ-kh9ex
@AZ-kh9ex Жыл бұрын
If we are importing AppRouter from server into client, I am unable to understand how are we going to deploy this. We can't deploy react and nodejs separately in this case, right? Please help
@PartneredBrands
@PartneredBrands 2 ай бұрын
Kyle hi love your vids! Can you do one for auto-gen of unittests using plawright and also generates interactive swagger docs from any nextjs app that uses zod, lucia and trpc?
@diegoalairelibre
@diegoalairelibre Жыл бұрын
¡Gracias! Thanks
@WebDevSimplified
@WebDevSimplified Жыл бұрын
¡De Nada! You are very welcome.
@RomanOstolosh
@RomanOstolosh 9 ай бұрын
13:44 Is it possible to create several routers though and attach them to different endpoint to separate between the apps in a more complex setup? Or it's a technical limitation of TRPC?
@pablom2274
@pablom2274 8 ай бұрын
I'm at min 16 right now but I just did what you say and it works, you just have to create another "client" in the client side and pass the router to the createTRPCProxyClient function.
@wavyboyjodii
@wavyboyjodii 2 ай бұрын
thanks bruv
@leomangold
@leomangold Ай бұрын
Is the code available in some kind of repo anywhere? I'm having troubles with setting up the server and would want to know whats inside of the package.json files and stuff
@unhandledexception1948
@unhandledexception1948 7 ай бұрын
would it be reasonable to think of this as alternative to React Query ?
@youngcoding5055
@youngcoding5055 Жыл бұрын
Kyle, can you make a video Abt how to live preview a website template, live bootstrap themes? Please bro.
@cirex314
@cirex314 25 күн бұрын
5:33 is throw new TRPCError() not applicable here?
@cruz.aljon1990
@cruz.aljon1990 Жыл бұрын
Should the server and client in the same server?
@TariqSajid
@TariqSajid Жыл бұрын
i would awesome if we can you this in a separate backend and frontend like php backend and react js frontend
@BarisPalabiyik
@BarisPalabiyik Жыл бұрын
Yes, I am glad it's getting popular. It's an amazing magic.
@JokeryEU
@JokeryEU Жыл бұрын
thank you, was thinking of looking to learn more about tRPC :D to use it in my nextjs project
@farzadmf
@farzadmf Жыл бұрын
NICE! I'm wondering if tRPC and gRPC can be used together 🤔
@pablom2274
@pablom2274 8 ай бұрын
33:00 should I worry about sending 'Content-Type': 'application/json' ??
@oleh1
@oleh1 7 ай бұрын
No. TRPC does it for you
@aseemanand1
@aseemanand1 Жыл бұрын
What if backend and Frontend have separate repos
@plasmadice
@plasmadice Жыл бұрын
I have watched several of your videos. You don't waste time. So when I saw that this video was 45 minutes I decided to leave this comment and go to sleep. This can wait until tomorrow.
@chanmyaemaung
@chanmyaemaung Жыл бұрын
Awesome!!!
@pablom2274
@pablom2274 8 ай бұрын
30:20 how was the normal way??
@yaroslavozerov1121
@yaroslavozerov1121 11 ай бұрын
1. Every tutorial Kyle creates - always it seems like he knows it since his childhood. You even don't make a pauses to think or to remember something...I have no clue how is it possible at all xD 2. I still didn't get why do we need at all such complicated stuff as tRPC :(( I didn't saw many benefits
@JukeboxForArtists
@JukeboxForArtists 4 күн бұрын
Are you still using this or have you moved to server actions? Would be cool to see you create a project using this!
@WebDevSimplified
@WebDevSimplified 4 күн бұрын
I have a Twitter clone using tRPC. I have tried moving more to server actions, though, as they work well in many situations.
@davidmuturi2078
@davidmuturi2078 5 күн бұрын
Anyone watching this anytime from now , you should know that the trpc is now v11 while it was v10 in this video so check the documentation
@MeraTVi
@MeraTVi Жыл бұрын
Supabase crash course in 45 minutes. Will you make it ?
@ToddDunning
@ToddDunning Жыл бұрын
Mmmm I glazed over at about the halfway point. It would help me to get more of an architectural outline and the project context in the beginning. You do a great job flying through the code but I'm losing it figuring out the context of each function; when to do what and why. Longtime subscriber and fan here.
@llmaboi
@llmaboi Жыл бұрын
Instead of using cors in the server use a vite proxy less packages and very easy to configure
@ts8960
@ts8960 11 ай бұрын
no. cors is the easiest thing in the world to configure
@cxreed
@cxreed Жыл бұрын
what if i deploy on vercel but different repo? is it possible?
@metalsadman
@metalsadman Жыл бұрын
both needs. to be. in the same repo it seems.
@cxreed
@cxreed Жыл бұрын
@@metalsadman so, how structure project look like?
@masuya444
@masuya444 Жыл бұрын
Is this trpc v10 tutorial?
@spinix3744
@spinix3744 2 ай бұрын
so it is tightly coupled
@zombiefacesupreme
@zombiefacesupreme Жыл бұрын
9:19 Can you not use top level await here?
@douglascounts4634
@douglascounts4634 Жыл бұрын
Using await at the top level requires a lot of changes to your "package.json" and your "tsconfig.json" files. Most of these changes involve forcing node to use newer module types and break a lot of other libraries that you may have in a larger project. You can't use node's popular "require" function for example to do imports.
@zombiefacesupreme
@zombiefacesupreme Жыл бұрын
@@douglascounts4634 thank you so much for the detailed answer. I had some issues with the compiler yelling at me about that and that makes total sense in that context. :)
@ts3798
@ts3798 Жыл бұрын
Didn't know Robert Paul Champagne was in web development.
@satvik0099
@satvik0099 7 ай бұрын
Why not in next js 😭
@cherubin7th
@cherubin7th Жыл бұрын
You must put a privacy policy on your website when you use that and disable it if the user disagrees in the EU.
@vrechko
@vrechko Жыл бұрын
source?
@Fuzbo_
@Fuzbo_ Жыл бұрын
@@vrechkomaybe they’re talking about the Highlight sponsor? I don’t see anything online related to tRPC needing to be put into the privacy policy
@vrechko
@vrechko Жыл бұрын
@@Fuzbo_ Yeah might be it. Was genuienly curious if that was true.
@t3dotgg
@t3dotgg Жыл бұрын
o n e o f u s
@TsoiIzAlive
@TsoiIzAlive Жыл бұрын
Gains are noticeable 👍
@firewatermoonsun
@firewatermoonsun 10 ай бұрын
I watch at 0.75 speed))
@rajnishsrivastava4231
@rajnishsrivastava4231 Жыл бұрын
Theo pushed trpc alot
@metalsadman
@metalsadman Жыл бұрын
it's great tech so understandable. problem I'm seeing is when working on a team where peeps work on different repo for backend and frontend.
@Zagoorland
@Zagoorland Жыл бұрын
New hair, who dis
@tariqal-malki8401
@tariqal-malki8401 Жыл бұрын
Who gave you the black eye??
@dt7472
@dt7472 Жыл бұрын
It reminds me apollographql
@rhul0017
@rhul0017 7 ай бұрын
People hate angular and all other frameworks settle down to patterns from angular!!!
@oleh1
@oleh1 7 ай бұрын
how is trpc a pattern from angular?
@jamesselene
@jamesselene Жыл бұрын
The single repository makes this a non-starter for many. Especially larger team projects.
@adambickford8720
@adambickford8720 Жыл бұрын
"Impossible" even though we were doing it 20 years ago, in java of all languages (yes, type safe to the client via cross compilation; gwt was exciting back when google was credible) There are *HUGE* downsides to this tightly coupled monolithic approach and being JS/TS isn't even one of them! If you need to mash out a simple app in a week or 2? Great. Need an app that will more than a year or 2? Not so much.
@jaabel249
@jaabel249 10 ай бұрын
I did not find this to be useful. Sorry.
@VercJames
@VercJames Жыл бұрын
node_modules/@trpc/client/dist/index.mjs:1:43: ERROR: Could not resolve "@trpc/server/observable" anyone?
@aghilannathan8169
@aghilannathan8169 Жыл бұрын
Yep I can't solve this issue.
@VercJames
@VercJames Жыл бұрын
@@aghilannathan8169 npm install @trpc/server to the client side. Found the answer, it’s in the official documentation
The Most Important Skill You Never Learned
34:56
Web Dev Simplified
Рет қаралды 84 М.
Learn Zod In 30 Minutes
31:03
Web Dev Simplified
Рет қаралды 131 М.
He tried to save his parking spot, instant karma
00:28
Zach King
Рет қаралды 20 МЛН
когда достали одноклассники!
00:49
БРУНО
Рет қаралды 4,1 МЛН
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 11 МЛН
BEGINNERS POWER POINT TIPS YOU NEVER KNEW( DESIGN TAB)
9:29
TutorialsAcademy
Рет қаралды 7
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Software Developer Diaries
Рет қаралды 68 М.
Learn React Query In 50 Minutes
51:09
Web Dev Simplified
Рет қаралды 267 М.
Two Sum | LeetCode 1 | JavaScript | Easy
13:20
Gordon Zhu
Рет қаралды 5 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 179 М.
Learn tRPC in 5 minutes
6:04
Matt Pocock
Рет қаралды 101 М.
microsoft will take screenshots of your computer every 5 seconds
9:34
Low Level Learning
Рет қаралды 104 М.
This Is Unbelievably Powerful
11:15
Web Dev Simplified
Рет қаралды 99 М.
GraphQL, tRPC, REST and more - Pick Your Poison
17:12
Theo - t3․gg
Рет қаралды 107 М.
tRPC: Smart and Easy APIs
25:29
Jack Herrington
Рет қаралды 119 М.