Learn tRPC In 45 Minutes

  Рет қаралды 101,297

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.
@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?
@StrayKev
@StrayKev Жыл бұрын
Thank you. tRPC is something I have always wanted to learn about.
@clarkhinchcliff7824
@clarkhinchcliff7824 Жыл бұрын
Perfect, just when I needed it! Thanks so much for this.
@SteveBoyer10
@SteveBoyer10 Жыл бұрын
Dude just been looking to learn this and boom, here's your video. Gracias sir.
@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 🐞
@macctosh
@macctosh Жыл бұрын
very efficient tutorial.... love this style.
@OtterSwims
@OtterSwims 5 ай бұрын
The last part about websockets was something i really needed, thanks for making this explainer.
@stevepr7430
@stevepr7430 Жыл бұрын
Thanks, this video is the best support to tRPC docs.
@nicolasbatistoni2036
@nicolasbatistoni2036 Жыл бұрын
Thanks! Great explanation!
@VladdyHell
@VladdyHell Жыл бұрын
It would be cool if you make a crash course for t3 stack too
@DavidBowmanJr
@DavidBowmanJr Жыл бұрын
I asked for this, and it happned. Thank you :)
@MattBodman
@MattBodman 3 ай бұрын
Excellent tutorial, thanks!
@pablom2274
@pablom2274 9 ай бұрын
At min 16 coding along just amazed how good this is
@alirashad23
@alirashad23 Жыл бұрын
that was so helpful for me thank you
@firewatermoonsun
@firewatermoonsun 11 ай бұрын
Thank you so much buddy!
@TON_NOT_Fan
@TON_NOT_Fan 11 ай бұрын
T3 stack tutorial needed!
@navneetpatel6193
@navneetpatel6193 10 ай бұрын
Thankyou soo much Kyle.
@faizanahmed9304
@faizanahmed9304 Жыл бұрын
Wooo thanks man!
@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
@mediocreTyler
@mediocreTyler Жыл бұрын
Thanks Kyle
@juanisimioli
@juanisimioli Жыл бұрын
Kyle, I need some solidity videos from 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.
@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.
@jeromemanceau4263
@jeromemanceau4263 Жыл бұрын
Thanks Kyle!.. just wanted to also review Prisma and... look at that, you have a tutorial about Prisma as well :D
@farazayaz2526
@farazayaz2526 Жыл бұрын
❤ Love you man!
@elonmask7271
@elonmask7271 Жыл бұрын
Was actually waiting for this. Thank you so very much.
@rukeeojigbo2221
@rukeeojigbo2221 8 ай бұрын
Thanks a lot
@ayushdedhia25
@ayushdedhia25 Жыл бұрын
I think tRPC can be the new standard for building APIs!! 🤔
@Michael-Martell
@Michael-Martell Жыл бұрын
So, with this and the prisma course, are you leaning towards T3?
@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?
@wavyboyjodii
@wavyboyjodii 3 ай бұрын
thanks bruv
@rolandfancier3666
@rolandfancier3666 Жыл бұрын
thx for your tutorial~ but how can i get the demo you show in the video?
@diegoalairelibre
@diegoalairelibre Жыл бұрын
¡Gracias! Thanks
@WebDevSimplified
@WebDevSimplified Жыл бұрын
¡De Nada! You are very welcome.
@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?
@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
@mahboobmohammad1868
@mahboobmohammad1868 Жыл бұрын
Out of curiosity, why don't you use node --watch instead of nodemon
@youngcoding5055
@youngcoding5055 Жыл бұрын
Kyle, can you make a video Abt how to live preview a website template, live bootstrap themes? Please bro.
@JokeryEU
@JokeryEU Жыл бұрын
thank you, was thinking of looking to learn more about tRPC :D to use it in my nextjs project
@RomanOstolosh
@RomanOstolosh 10 ай бұрын
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 9 ай бұрын
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.
@BarisPalabiyik
@BarisPalabiyik Жыл бұрын
Yes, I am glad it's getting popular. It's an amazing magic.
@TariqSajid
@TariqSajid Жыл бұрын
i would awesome if we can you this in a separate backend and frontend like php backend and react js frontend
@davidmuturi2078
@davidmuturi2078 20 күн бұрын
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
@cruz.aljon1990
@cruz.aljon1990 Жыл бұрын
Should the server and client in the same server?
@unhandledexception1948
@unhandledexception1948 8 ай бұрын
would it be reasonable to think of this as alternative to React Query ?
@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
@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.
@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
@llmaboi
@llmaboi Жыл бұрын
Instead of using cors in the server use a vite proxy less packages and very easy to configure
@ts8960
@ts8960 Жыл бұрын
no. cors is the easiest thing in the world to configure
@aseemanand1
@aseemanand1 Жыл бұрын
What if backend and Frontend have separate repos
@cirex314
@cirex314 Ай бұрын
5:33 is throw new TRPCError() not applicable here?
@JukeboxForArtists
@JukeboxForArtists 19 күн бұрын
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 18 күн бұрын
I have a Twitter clone using tRPC. I have tried moving more to server actions, though, as they work well in many situations.
@pablom2274
@pablom2274 9 ай бұрын
33:00 should I worry about sending 'Content-Type': 'application/json' ??
@oleh1
@oleh1 7 ай бұрын
No. TRPC does it for you
@chanmyaemaung
@chanmyaemaung Жыл бұрын
Awesome!!!
@farzadmf
@farzadmf Жыл бұрын
NICE! I'm wondering if tRPC and gRPC can be used together 🤔
@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?
@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. :)
@MeraTVi
@MeraTVi Жыл бұрын
Supabase crash course in 45 minutes. Will you make it ?
@pablom2274
@pablom2274 9 ай бұрын
30:20 how was the normal way??
@spinix3744
@spinix3744 2 ай бұрын
so it is tightly coupled
@masuya444
@masuya444 Жыл бұрын
Is this trpc v10 tutorial?
@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.
@ts3798
@ts3798 Жыл бұрын
Didn't know Robert Paul Champagne was in web development.
@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.
@satvik0099
@satvik0099 7 ай бұрын
Why not in next js 😭
@tariqal-malki8401
@tariqal-malki8401 Жыл бұрын
Who gave you the black eye??
@firewatermoonsun
@firewatermoonsun 11 ай бұрын
I watch at 0.75 speed))
@dt7472
@dt7472 Жыл бұрын
It reminds me apollographql
@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.
@t3dotgg
@t3dotgg Жыл бұрын
o n e o f u s
@TsoiIzAlive
@TsoiIzAlive Жыл бұрын
Gains are noticeable 👍
@Zagoorland
@Zagoorland Жыл бұрын
New hair, who dis
@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
This Is Unbelievably Powerful
11:15
Web Dev Simplified
Рет қаралды 100 М.
What is RPC? gRPC Introduction.
6:09
ByteByteGo
Рет қаралды 459 М.
TRY NOT TO LAUGH 😂
00:56
Feinxy
Рет қаралды 19 МЛН
Homemade Professional Spy Trick To Unlock A Phone 🔍
00:55
Crafty Champions
Рет қаралды 54 МЛН
This New React Hook Breaks All The Rules And I Love It
7:56
Web Dev Simplified
Рет қаралды 179 М.
Learn tRPC in 5 minutes
6:04
Matt Pocock
Рет қаралды 102 М.
Don't Migrate To tRPC
3:39
Theo - t3․gg
Рет қаралды 62 М.
10 Tailwind Classes I Wish I Knew Earlier
13:31
Web Dev Simplified
Рет қаралды 164 М.
Two Sum | LeetCode 1 | JavaScript | Easy
13:20
Gordon Zhu
Рет қаралды 6 М.
Speed Up Your React Apps With Code Splitting
16:50
Web Dev Simplified
Рет қаралды 369 М.
This Package Saved My SaaS
5:46
Josh tried coding
Рет қаралды 66 М.
Do I even need this anymore?
5:41
Theo - t3․gg
Рет қаралды 45 М.
Learn Zod In 30 Minutes
31:03
Web Dev Simplified
Рет қаралды 133 М.