Do I even need this anymore?

Поділитися
Вставка
  • Опубліковано 22 сер 2024
  • HUGE SHOUTOUT TO OUR SPONSOR HIGHLIGHT: www.highlight....
    I added tRPC to the Ping codebase in September 2021. It's crazy to think how much has changed since.
    USE CREATE T3 APP github.com/t3-...
    ALL MY VIDEOS ARE POSTED EARLY ON PATREON / t3dotgg
    Everything else (Twitch, Twitter, Discord & my blog): t3.gg/links
    S/O Mir for the awesome edit 🙏

КОМЕНТАРІ • 108

  • @t3dotgg
    @t3dotgg  Рік тому +10

    CHECK OUT HIGHLIGHT THEY'RE PRETTY DOPE www.highlight.io/r/theo-trpc

  • @ghostlexly
    @ghostlexly 8 місяців тому +9

    Pros and cons for tRPC after I checked it out:
    Pros:
    - you get type safety on front end
    - very easy to call your api
    - you can add a middleware to your apis and check for roles and auth
    - backend and frontend on same repository
    Cons:
    - you can use server actions from nextjs for same result and built in
    - you can’t upload files with tRPC protocol
    - you can’t separate backend and frontend
    - you can’t develop a mobile app and connect it to your tRPC backend on a separate repo, everything need to be on the same repo (you can still check turbo repo but meh..)
    - you can’t use queues and jobs with a nextjs full stack (bullmq, bee..)
    - everything is changing so fast, better go with a more stable choice like NestJS for the backend

    • @TikTokTrendsCompilation
      @TikTokTrendsCompilation 6 місяців тому

      thanks. i'll pass on trpc then. if it restricts the scalability to further take my nextjs codebase to extend on mobile platforms then im good without trpc

    • @amaryadav8703
      @amaryadav8703 4 місяці тому

      Would submodules in a github repo, solve the problem "you can’t develop a mobile app and connect it to your tRPC backend on a separate repo, everything need to be on the same repo"?

    • @FjongRootDivision
      @FjongRootDivision 4 місяці тому +3

      My reaction on your cons:
      - Server actions have their own specific pro's and cons. To be fair you are comparing clientside data fetching with serverside data fetching. Regardless of tRPC, these are 2 different concepts. Would you for example make a project without client-side state and solely rely on serverside state? I think not.
      - Why would you want to do that, when uploading you would request an upload URL from your upload service that handles that. tRPC can perfectly handle that.
      - That is the purpose of using tRPC or any backend for frontend pattern. You want tightly coupled backend and frontends. Your real backend would be for example a nodejs express server, not your tRPC server
      - Again your Backend for Frontend should ALWAYS be in the same repo as your frontend. This is a tightly coupled setup
      - Queues and jobs are to be used with your nodeJs backend that has the trpc adapter on it. So your setup could for example be React FE, NodeJs Express BFF + tRPC
      - Everything is changing fast but the concepts and foundation will always remain the same. Know your history, MVC has been here for a long time. The BFF pattern is a proven strategy. I don't see that changing soon.

    • @lessquo
      @lessquo 3 місяці тому

      Here's some alternatives to tRPC (33k) supporting end-to-end type safety (with current GitHub stars):
      - ts-rest (2k)
      - Zodios (1.6k)
      - Hono (16k)
      - ElysiaJS (8.5k)
      ts-rest and Zodios seem too new and far from mature. ElysiaJS is focusing only on Bun. Hono looks the most interesting to me.

    • @amansagar4948
      @amansagar4948 Місяць тому

      Half the points are invalid as there’s trpc-openapi you can use to generate openapi spec or export the types as package
      You never loose low level router control, you can always make an upload endpoint

  • @kH-ul4hk
    @kH-ul4hk Рік тому +51

    A t3 tutorial by the man himself would be great!

    • @jameshobbs
      @jameshobbs Рік тому +4

      Alex?

    • @qwerty-or1yg
      @qwerty-or1yg Рік тому +6

      I would love an actual full t3 tutorial instead. Like dig deep on everything. It's probably already there and I'm not aware.

    • @BarisPalabiyik
      @BarisPalabiyik Рік тому +2

      It's on it's way!

    • @ilovenaturesound5123
      @ilovenaturesound5123 Рік тому +5

      Uploaded 7 hours ago lol. Theo probably saw your comment!

  • @tj_dev
    @tj_dev Рік тому +49

    Unsolicited feedback.
    Theo, you seem like a genuine person and your take on certain libraries convinced me to give them a try, and some of them even have turned out to be a good match for me. Personally I enjoy your way of presentation. Yet clickbaity titles like this one, where you are playing with emotions, giving in a little bit to javascript fatigue, while video is basically "everything's good and even better" is off-putting and contradictory to who you seem to present to be - a person trying to find a right balance within a sea of options. I understand "stand out or die" problem in online space, yet even though I'm interested what you have to say I will be ignoring your youtube or twitch channel because I have no way of discerning between content that provide value to my life and ones that do not. But maybe it's what gave you prominence here and reason why I heard about you in the first place even though it was through a friend.

    • @josevargas686
      @josevargas686 11 місяців тому +1

      Not only is it clickbait, it is straight up confusing. I am here half-way through the video wondering if I am totally misunderstanding something in the message, or if the title itself was a sarcastic piece of clickbait. Like really? These 5 minutes (+ the 10 minutes of getting distracted from this video bc I couldn't understand) could have been spent on another video that actually taught me something useful. At this point I just wasted 15 minutes on a video and learned 0 things about what TRPC even is. So yeah, I watched a 5 minute video about a thing and when the video ended, I still do not know a thing about it. Eh.

    • @captainwalter
      @captainwalter 8 місяців тому

      stop whining

  • @boh419
    @boh419 Рік тому +16

    t3 stack tutorial is so much needed i watched the roundest vod but it was a bit chaotic 😅

  • @phoenixdblack
    @phoenixdblack Рік тому +8

    Amazing timing, needed a video like this to pitch using trpc to the company I am working for

  • @j0hannes5
    @j0hannes5 Рік тому +16

    I'd happily watch and follow along a T3 course if you made one, even though I don't need this tech for the app I'm building.

    • @t3dotgg
      @t3dotgg  Рік тому +4

      Well you should be hyped for what's coming

    • @ChristofFritz
      @ChristofFritz Рік тому +1

      I support that. Would totally buy it. Just don't make it prohibitively expensive.

    • @t3dotgg
      @t3dotgg  Рік тому +42

      @@ChristofFritz I will never charge for education materials that could help a developer get a job.
      Will be up on the channel by next week at latest. Ideally by Friday. 3 hours long.
      I worked my ass off for this.

    • @eltyo340
      @eltyo340 Рік тому +2

      I went from graphql to tRPC and I'm never looking back. Theo isn't lying when he's saying developer experience has never been better

    • @hmzakhalid
      @hmzakhalid Рік тому +4

      @@t3dotgg HOLY SHIT. I really can't wait now. Thanks ALOT!

  • @siamekanto
    @siamekanto Рік тому +1

    Theo and TRPC - better love story than twilight

  • @alexandruaxentioi3006
    @alexandruaxentioi3006 Рік тому +6

    Would be great for a tutorial or course from you, I'm sure the quality would be great

  • @gauravvarma3645
    @gauravvarma3645 Рік тому +6

    Is tRPC still good though if the front end and back end teams are separate? And if not, then does that mean that you're able to get away with tRPC at Ping because the front end and back end teams are combined?

    • @dealloc
      @dealloc Рік тому +1

      You can still use tRPC at the BFF layer. Often when using REST APIs you end up making a ton of requests on the browser. Instead you can make those requests in the BFF, then expose frontend-specific APIs that fit your needs on the frontend.
      While it doesn't free up the maintenance of types from the backend -> BFF, it does free up the types from BFF -> frontend as well as improving the UX by doing less requests in the browser.

    • @snehanshuphukon728
      @snehanshuphukon728 Рік тому

      @ui_wizard BFFs are plain evil

    • @dealloc
      @dealloc Рік тому +1

      @@snehanshuphukon728 Elaborate please.

  • @offroaders123
    @offroaders123 Рік тому +3

    What the heck Theo, crazy timing again 😂😂😂

    • @offroaders123
      @offroaders123 Рік тому +1

      I should really go to bed

    • @t3dotgg
      @t3dotgg  Рік тому +1

      Bad news - I posted a vid on the 2nd channel as well 🤣

    • @offroaders123
      @offroaders123 Рік тому

      Was able to end up watching the video. Just want to say thanks for all of the hard work you put in here! Your videos inspire me to getting around and making some of my own too. I haven't made any dev videos yet before.

  • @MrGarkin
    @MrGarkin 9 місяців тому

    in typescript its trivial to write a typesafe RPC
    important bits are underlying infrastructure

  • @Tommy-and-Ray
    @Tommy-and-Ray Рік тому

    I'm the like button for : Full t3 tutorial that digs deep on everything

  • @bluesbr09
    @bluesbr09 Рік тому +2

    How does trpc hold up with RSC? It wasn’t very obvious to me when reading the docs.

  • @unowenwasholo
    @unowenwasholo Рік тому +1

    I would like to see a video outlining the best practices / methodology behind using hooks for API calls (useQuery / useMutation). Coming from single API call land, I am having to ease myself into this new pattern and would like to use it but fear doing so without some sort of background into the most effective usage will result in losing a lot of the benefits I'd imagine come with such patterns. I watched the "Data Fetching in React with Remix" video and it touches upon these but I think something with more focus on the specifics of trpc would be great and in line with the area that you place yourself bridging new developers with advanced concepts.

  • @himanshuahujaofficial7813
    @himanshuahujaofficial7813 Рік тому +1

    Thanks, Theo for all of the hard work. I have been struggling to decide on my project. I have been watching you and I like trpc. So, now I’m having hard time in choosing my tech stack. I think atm I have two choices I.e trpc with nextjs or rust with nextjs. What would you recommend?

  • @shaynewilliams4482
    @shaynewilliams4482 Рік тому

    Give us that trpc tutorial, don't hold out on us man!

  • @peroforrr7663
    @peroforrr7663 Рік тому

    I would like to see a video outlining the best practices

  • @crofoh
    @crofoh Рік тому +1

    Will your t3 tutorial that you are preparing be using next-auth or clerk for handling the auth layer?

  • @Leto2ndAtreides
    @Leto2ndAtreides Рік тому +2

    I wonder if you have a CMS recommendation to go with T3.

    • @jakubwodarczyk9477
      @jakubwodarczyk9477 Рік тому

      My guess is that payloadcms would be a great way to establish CMS in your app. You can give it a look and check if it meets your needs :)

  • @JohnSmith-gu9gl
    @JohnSmith-gu9gl Рік тому +1

    please show how to deal with n+1 problems that we would solve with dataloader in graphql
    what also would be great is how to work with tRPC in a team.
    For example if you have a pure frontend and backend team and what the best practices are if you want to split tRPC in two different servers, one just for frontend and one just for backend.

  • @arish_shah
    @arish_shah Рік тому

    yep, we might need that trpc tutorial chief

  • @ghostlexly
    @ghostlexly 8 місяців тому

    You didn’t talked about server actions vs tRPC

  • @Mariiius53
    @Mariiius53 Рік тому

    trpc doesn't solve a problem, if I'm not mistaken: Type safety with external API.

  • @caldog20
    @caldog20 6 місяців тому

    What about ConnectRPC? The newer solution from the Buf team?

  • @ryanhenshall3158
    @ryanhenshall3158 Рік тому

    Even though you took down the video, I really appreciated the Twitch video! It's great to have a content creator who is genuine

  • @nathanbrachotte
    @nathanbrachotte Рік тому +1

    This sounds great overall, but as a big trpc/NextJS noob:
    I see in T3 stack that trpc's api client is using `ssr: false`. How is this current implementation ever running the queries server-side? Would love an explanation on that.

    • @t3dotgg
      @t3dotgg  Рік тому +5

      SSR = React code is run on server every request
      API = some data is requested from a server
      TRPC is using Next APIs, not SSR. tRPC SSR = “Every page is rendered and all the data it’s fetched on the server on every page request”

  • @juanal07
    @juanal07 Рік тому +1

    I've been using ct3 app in a side project and its rly cool. I want to ask u guys how ct3 app match with other paradigms in order to scale an app like: Event-driven design, CQRS, DDD, repository pattern, etc.

  • @appsky7982
    @appsky7982 2 місяці тому

    trpc looks too verbose for adding routes, inputd, mutations, etc. Is there an alternative using decorators?

  • @xReDxTuRtLeZx
    @xReDxTuRtLeZx Рік тому

    i have been enjoying trpc since i picked up t3 app. i would love if you could make a tutorial vid for t3 app and your approach to how you build pages and components and all

  • @dosomecoding
    @dosomecoding Рік тому +2

    Add Configuration for testing t3 stack

    • @dosomecoding
      @dosomecoding Рік тому +2

      I am facing difficulties in testing , due to env . vitest and jest are throwing errors

  • @Kairulol
    @Kairulol Рік тому +1

    We currently use GraphQL, have some deeply nested relationships, and use partial loading which works well, but this only works because we can write one resolver with two different GQL documents that query different amounts of data from said resolver. Is something like this possible with tRPC?
    Refactor time aside, this is one of the major things holding us back from migrating.

    • @dealloc
      @dealloc Рік тому

      Yes and no. GraphQL's resolvers are powerful when you have distributed endpoints, because those resolvers are handled at field level. That said, tRPC can still be used with a Dataloader, just like you'd do with queries that results in N+1 problems.
      If you define your procedures based on the needs of the components that consume them, you can resolve the dependencies in those procedures and just respond with the structure as the frontend needs it.
      Is there any reason to migrate away from GraphQL? How large is your project and how many services do you have? Do you use federation?

    • @Kairulol
      @Kairulol Рік тому

      ​@@dealloc It's less about GraphQL as a whole and more to do with TypeORM/TypeGraphQL. Inherited a codebase that's riddled with performance issues and hacky workarounds that we've only been able to nail down to existing issues or quirks with either library.
      Something like tRPC is just one of the options we've considered since we migrated to a monorepo, just weighing up options really.
      Sitting at around 120 queries/mutations and a couple subscriptions in a single monolith right now.

  • @hamburger-fries
    @hamburger-fries Рік тому

    We need a replacement for Prisma!!!! Prisma cant handle larger projects. T3 really has been a game changer.

  • @WolfireGaming
    @WolfireGaming Рік тому +1

    "I can return something on my backend, and then call it on my frontend, and there is no bullsh*t between those things."
    As someone who has run into issues with developers not paying attention and sending misshapen data from a JavaScript frontend to a Scala backend (and vice versa), I feel this.

  • @hakuna_matata_hakuna
    @hakuna_matata_hakuna Рік тому

    React server components are here because people wouldn't use relay which has a ton of benefits , i wouldn't use tRPC for a small project because it's just abunch of unnecessary overhead for APIs that won't change that much , and for ab bigger project GraphQl is still king and has better performance and features

  • @danvilela
    @danvilela Рік тому

    Theo is for Trpc what Primeagen is for Rust

  • @JosephSalinas123
    @JosephSalinas123 Рік тому

    +1 for T3 tutorial

  • @BrontoKroxig
    @BrontoKroxig Рік тому

    Yes

  • @michaelchen163
    @michaelchen163 Рік тому

    Relay pretty coo, had this shit years ago

  • @thekwoka4707
    @thekwoka4707 Рік тому

    Your useBackend thing is just like $server in solidStart

  • @richardhoekstra960
    @richardhoekstra960 Рік тому

    Have you used Tinybird before?

  • @Alcamore
    @Alcamore Рік тому

    A tutorial would be fantastic.

  • @maninalift
    @maninalift Рік тому

    Being interested in full-stack rust solutions, it seems like rust could potentially do this at least as well as typescript. Without trying to copy the interface of trpc exactly, attributes, gereric, macros and or custom derive macros seem like they provide more than the necessary power to do "validation first" typing. I'm an absolute beginner with rust but as someone who used to be so into the black magic of C++ template metaprogramming, I have a clue how rust might represent these things at the type level.

  • @mateleo78
    @mateleo78 Рік тому +1

    What about tRPC vs gRPC ?

    • @t3dotgg
      @t3dotgg  Рік тому +7

      Idk if you’re trying to trigger me but pls check my channel for my gRPC vid if you’re serious here

  • @manuelsanchezweb
    @manuelsanchezweb Рік тому

    We need your tutorial!

  • @tanotive6182
    @tanotive6182 Рік тому

    Please make that T3 tutorial!

  • @markli7641
    @markli7641 Рік тому

    do I need it if I’m using remix framework,

  • @blue_name_warrior
    @blue_name_warrior 5 місяців тому

    vue support?

  • @rashzh5502
    @rashzh5502 Рік тому

    How to use T3 with jwt and OAuth2?

  • @persegona77
    @persegona77 Рік тому

    +1 for a tutorial. Please have auth as part of it.

  • @Woolfy95
    @Woolfy95 Рік тому

    Fetch API all the way

  • @facundoflores4763
    @facundoflores4763 Рік тому

    does stil GOD?

  • @dailyfunnytv358
    @dailyfunnytv358 Рік тому

    so the answer is yes? you still need it?

  • @merveillevaneck5906
    @merveillevaneck5906 Рік тому

    make the tutorial, ITS NOT UP FOR DEBATE

  • @GoeHybrid
    @GoeHybrid Рік тому +55

    Sounds like an abstraction over an abstraction over another abstraction...

    • @jameshobbs
      @jameshobbs Рік тому +10

      nope, RTFM!

    • @BarisPalabiyik
      @BarisPalabiyik Рік тому +17

      Look into it. You'll thank us later.

    • @martiananomaly
      @martiananomaly Рік тому +49

      If you hate abstractions so much, why don't you write some assembly code for web dev. Heck, why not go for the transistors directly lol.

    • @StingSting844
      @StingSting844 Рік тому +4

      No dude. Write a few lines with it

    • @xunjin8897
      @xunjin8897 Рік тому +4

      Well that's literally computer science, we just use tons of layers of indirection :D

  • @coleperschon
    @coleperschon Рік тому

    gRPC vs tRPC?

  • @browntigerus
    @browntigerus Рік тому

    Who wants to use Prisma. Massive overhead for very little of value. I understands it avoids the dialects: but prisma does not work with Mango anyway. May be Zod by I don't know... Still too much overhead.

  • @Kevin-qz4eq
    @Kevin-qz4eq 2 місяці тому

    clickbait title

  • @markli7641
    @markli7641 Рік тому

    do I need it if I’m using remix framework,