I'm Never Using React Router Again

Поделиться
HTML-код
  • Опубликовано: 28 янв 2024
  • We can all appreciate React Router for what it is. But I spent a while playing around with TanStack Router and this is definitely my go-to for pure React projects. Just look at the TypeScript support :O
    tanstack router website: tanstack.com/router/latest
    -- my links
    Newsletter: www.joshtriedcoding.com/
    Discord: / discord
    GitHub: github.com/joschan21
  • НаукаНаука

Комментарии • 106

  • @toofaeded5260
    @toofaeded5260 3 месяца назад +33

    Love the endless change in life cycle of apps before going from dev to production.

  • @rjwhite4424
    @rjwhite4424 3 месяца назад +5

    Dude whenever I want to know what's up and coming libraries or software I check out your channel. You rock!! I'd love to see a longer in depth tutorial video where you built a basic app.

  • @froxx93
    @froxx93 2 месяца назад +3

    Oh wow, thanks a ton for the Shift+option+O shortcut! It has always been a pain point for me to manually remove those things

  • @swaroopkanakam8684
    @swaroopkanakam8684 3 месяца назад

    Thank you for sharing these informative videos; they've certainly enriched our knowledge and understanding

  • @hyperprotagonist
    @hyperprotagonist 3 месяца назад +146

    Don’t lie Josh. You’ll be using react router in your next project 😂

  • @thebenkalungi
    @thebenkalungi 2 месяца назад

    Thanks... this is a great intro video. is like a portal that keeps changing the UI view whenever a matching route is active.

  • @zakir.nuriiev
    @zakir.nuriiev 3 месяца назад

    Cool review! Thank you!

  • @joe-robin
    @joe-robin 3 месяца назад +5

    4:27
    Josh: That is magical ✨
    Also Josh : That is basic stuff.

  • @dileepa-mn2to
    @dileepa-mn2to 3 месяца назад

    Need a full video about this

  • @prashlovessamosa
    @prashlovessamosa 3 месяца назад +4

    Please make more comprehensive Tut on this please.

  • @BliitzPint
    @BliitzPint 3 месяца назад +5

    Josh: **eats Ryder** - Twix: **comes out** - Josh: “I never eat Ryder again!!!”

  • @MrWalrusxD
    @MrWalrusxD 3 месяца назад

    I am trying to switch to Tanstack Router from React Router. But as I experience, all of my components are going to be placed in the routes. Is that a right conclusion?
    You can add the component as a function but not give any properties.
    Has anybody have tips?

  • @ardianhotii
    @ardianhotii 3 месяца назад

    Can you please make a tutorial making and app using tanstack router and react query with pagination , this would be best combo

  • @Tifidy
    @Tifidy 3 месяца назад

    this was ridiciliously helpfull thanks

  • @sohamnandi7526
    @sohamnandi7526 3 месяца назад +5

    We need an end to end tutorial

  • @oussamasethoum1665
    @oussamasethoum1665 3 месяца назад +1

    I hope you have talk about the layout part next time.

  • @athulgeorge4873
    @athulgeorge4873 3 месяца назад

    Can u make a full stack app using tanstack router and trpc with SSR? Would love to see if SSR is possible with tanstack router

    • @gavinlindridge
      @gavinlindridge 3 месяца назад

      I would love to see this setup also!

  • @versaleyoutubevanced8647
    @versaleyoutubevanced8647 3 месяца назад +29

    Crazy how Josh don't know what Outlet does, is literally the most awesome thing about react routers

    • @BliitzPint
      @BliitzPint 3 месяца назад

      I was also a bit shocked about that. I mean come on, this doesn’t exist for only 2 days or so…

    • @graysonorr8172
      @graysonorr8172 3 месяца назад

      He could of at least looked it up. He does edit his videos@@lollol-il2vz

    • @darwinnarro2889
      @darwinnarro2889 3 месяца назад

      I dont know what Outlet does too 😆the funny thing is that in some projects I use React Router
      PD: I would rather never touch anything about React Router to be honest

    • @gpyk306
      @gpyk306 3 месяца назад

      Outlet is a place which sells slightly damaged or outdated goods from a particular manufacturer, or goods that it made in greater quantities than needed. But in a dev world outlet is a magical component that makes dev tools work 😅

  • @SamuelKarani
    @SamuelKarani 3 месяца назад +5

    "fully type safe" does't add much for most sites and projects which are small and have a few routes to begin with

    • @athulgeorge4873
      @athulgeorge4873 3 месяца назад +4

      Ur complaining about something the tool was not designed for. It’s for large apps that heavily rely on routing. Updating routes and search params can cause large breaking changes that u would not be aware of unless u had good typechecking on routes.

  • @jitx2797
    @jitx2797 3 месяца назад

    Hey. I would love to see project on React Vite Tanstack Query and Router

  • @xya6648
    @xya6648 3 месяца назад

    Congrats on the mac!

  • @jamshediqbal7936
    @jamshediqbal7936 3 месяца назад +1

    I only like the type-safe part but I also hate it at the same time because I have to use that much boilerplate code to make it actually type-safe... 😂

  • @anth0ni33
    @anth0ni33 3 месяца назад +17

    Nothing is beating the loader and action of react router💪🏾

    • @vty4261
      @vty4261 3 месяца назад +3

      dude, there is loaders as well and they are type safe

    • @anth0ni33
      @anth0ni33 3 месяца назад

      @@vty4261 just found out. Thanks

  • @0xtz_
    @0xtz_ 3 месяца назад

    I need to try this 👀, but I need to migrate all the routes hhhh

  • @divyanshm.2276
    @divyanshm.2276 3 месяца назад

    this is great

  • @zakidzz
    @zakidzz 3 месяца назад

    hey do us an advanced shadcn totorial advanced costumisation and variants .....

  • @pradyumnaramesh4226
    @pradyumnaramesh4226 3 месяца назад

    josh moved to mac?

  • @ralkey
    @ralkey 3 месяца назад

    i dont understand the point of using a router.
    it seems so much easier to me to just create folders which tells where in the url something is (like /home)
    and put a .tsx file there
    this just seems way too much work for something so basic
    is there something about routers that im not getting?

    • @neociber24
      @neociber24 3 месяца назад

      That's a router, but the complexity is removed

  • @samwise8731
    @samwise8731 3 месяца назад

    "fully typesafe" but in the codegen, I see some "any" type lol

  • @iury664
    @iury664 3 месяца назад

    it is unbound from react tree ?

    • @iury664
      @iury664 3 месяца назад

      well "parallel Route Loaders" hahah nice

  • @anasouardini
    @anasouardini 2 месяца назад

    I'm too used to the in-one-place version of routing.

  • @TheIpicon
    @TheIpicon 3 месяца назад

    Vercel should take some pointers

  • @statuschannel8572
    @statuschannel8572 3 месяца назад +6

    looks good But no thanks, i already spent lots of time from react router v5 to v6 to v6.3.3 to v6.4 and not going to invest anymore time in routing!

    • @joshtriedcoding
      @joshtriedcoding  3 месяца назад

      fair enough

    • @zoltanbalogh8949
      @zoltanbalogh8949 3 месяца назад +1

      And there is also no sense using this library :D you can achive routes type safety with many other ways (you do not need another useless fancy "autogen "solution"") and also react-router way too powerful
      This feels way too complex, compared to only few lines of code with react router,

    • @athulgeorge4873
      @athulgeorge4873 3 месяца назад

      @@zoltanbalogh8949autogen is one way of doing it, tanstack router prefers u don’t do it that way but gives u the option regardless

    • @statuschannel8572
      @statuschannel8572 3 месяца назад

      @@zoltanbalogh8949 true i already made a simple approach which is putting all the routes in an object so you don't have to worry about typos and stuff. there could be better approaches as well

  • @omarkraidie
    @omarkraidie 3 месяца назад

    So what about next?

  • @khaledsanny4817
    @khaledsanny4817 3 месяца назад +3

    So much boilerplate 😅

  • @shadowpony9243
    @shadowpony9243 Месяц назад

    💥

  • @orzarhi4050
    @orzarhi4050 3 месяца назад

    Josh, enjoy your new Mac! 😅

  • @preetam-raj
    @preetam-raj 3 месяца назад

    Sorry! I will go with NextJS

  • @capztube9069
    @capztube9069 Месяц назад

    Outlet is too good to gloss over!

  • @paw565
    @paw565 3 месяца назад

    I think it's easier to just use next js

  • @neighborhood10xdeveloper
    @neighborhood10xdeveloper 3 месяца назад +3

    7:50 Installed the package with pnpm and ran the server with yarn. 🤣🤣

    • @joshtriedcoding
      @joshtriedcoding  3 месяца назад

      haha its just quicker to type

    • @johnc0de
      @johnc0de 3 месяца назад

      Maybe bun will be the new shortcut 👀@@joshtriedcoding

  • @johnsoto7112
    @johnsoto7112 3 месяца назад +1

    Or use nextjs!!

  • @denniscual4618
    @denniscual4618 3 месяца назад

    It just crazy how we can say that React Router is not a modern router lib. Remix is using it under the hood and these loaders/mutations and apis for managing url state are driven by React Router. This Tanstack and React Router are not totally comparable. Tanstack is more opinionated compare to the later like having its own caching. But you can integrate caching into React Router like using it with react-query.
    But saying React Router is not a modern is kinda misleading.

  • @barcalover016
    @barcalover016 3 месяца назад +1

    how much did they pay you? this is just an ad guys

  • @dantelooper2283
    @dantelooper2283 3 месяца назад

    I wonder how React devs feel when they use Angular Routing System.

    • @disinfect777
      @disinfect777 3 месяца назад

      react devs use nextjs anyway

  • @knsense
    @knsense 3 месяца назад +1

    how can you title this "I'm never using react router again" then proceed to say "I don't know what an outlet is". Did you ever use react-router to begin with?

  • @Zagoorland
    @Zagoorland 3 месяца назад +1

    It's only for "vanilla" react only, right? Like for dashboards, or SPAs. Vite + react is not widely used anymore, due to SSR libs like Next. It's a shame, because this library looks very cool indeed.

    • @iced2916
      @iced2916 3 месяца назад +1

      I would say react by its own is still used a lot

    • @gcash49
      @gcash49 3 месяца назад +9

      dont be fooled by twitter and reddit, react + vite is still used

  • @gravellife5643
    @gravellife5643 3 месяца назад

    JavaScript influencer is very popular job on youtube, obviously🙄

  • @robertsandiford6223
    @robertsandiford6223 3 месяца назад

    You're still using raw react? Why?

    • @denissorn
      @denissorn 3 месяца назад +1

      Why wouldn't he? For many projects SPA can be a better way of doing things. E.g. you have third party or own web APIs in doesn't matter which language, and you're building an actual application, not a web site (ERP, banking, Book keeping stuff etc) where you would care about SEO and random people.

    • @robertsandiford6223
      @robertsandiford6223 3 месяца назад

      @@denissorn What are you using to make these apps? CRA?

    • @denissorn
      @denissorn 3 месяца назад

      @@robertsandiford6223 last time I worked with react I used vite. Not sure what's the current best/recommended way to do it, but if I would simply search the web and check the situation/recommendedations. Vite worked quite well for me, and migrating projects from CRA to Vite was pretty straightforward and simple.

    • @nothotdog5
      @nothotdog5 2 месяца назад

      @@robertsandiford6223 React + Vite. CRA is dead

  • @electroheadfx
    @electroheadfx 3 месяца назад

    incroyable, its too fast ;) thx

  • @ivangechev4243
    @ivangechev4243 3 месяца назад

    Outlet is for putting children

  • @h051n
    @h051n 3 месяца назад +1

    naahh setup takes to long

    • @essamal-mansouri2689
      @essamal-mansouri2689 2 месяца назад

      Obviously if it's a small project with nothing important then this is not worth the setup but for anything where you want resilience and the type checking this is worth it even if it takes ten times longer

  • @lasindunuwanga5292
    @lasindunuwanga5292 3 месяца назад

    Are we really gonna forget the fact that this is for SPAs?
    All those SPAs will eventually become websites backed by a full-stack framework once those developers get to know about the drawbacks of SPAs. Then this package is in stone unless it is adopted by NextJS. I don't think that would happen either because NextJS and React-Router are maintained by Vercel. Pretty sad ;(
    Not for me though, because I don't like the maintainer of TanStack.

  • @ehm-wg8pd
    @ehm-wg8pd 3 месяца назад

    enough of click bait

  • @DaPaBe1999
    @DaPaBe1999 3 месяца назад

    The cool kids like to use TypeScript ("i cannot longer use vanilla js")

  • @Ali-rz6bn
    @Ali-rz6bn 3 месяца назад

    First

    • @_remma
      @_remma 3 месяца назад

      240th

  • @govindbisen388
    @govindbisen388 3 месяца назад

    Wtf is this easy?

  • @vinniv6806
    @vinniv6806 3 месяца назад +4

    yeah.... another JS library... doing exactly same job, like many other....

    • @KevinVandyTech
      @KevinVandyTech 3 месяца назад +2

      TanStack Router has so many innovations compared to other client-side and framework routers. It's actually a game-changing library.

    • @rayyanabdulwajid7681
      @rayyanabdulwajid7681 3 месяца назад

      ​@@KevinVandyTech Tanstack is excellent for data fetching and it's headless data grid. I don't know about this routing.

  • @xxXAsuraXxx
    @xxXAsuraXxx 3 месяца назад

    Josh you are too young and junior

  • @FranFiori94
    @FranFiori94 3 месяца назад

    You will probably switch to Remix in the future so i think ull be using react router

  • @lamhung4899
    @lamhung4899 3 месяца назад

    This is totally a lie.

  • @lonewolf7704
    @lonewolf7704 Месяц назад

  • @kurwacherry
    @kurwacherry 3 месяца назад

    isnt tanstack basically react query?

    • @ArcticPrimal
      @ArcticPrimal 3 месяца назад

      Tanstack Query is the new name for react query. Josh is showing a different Tanstack product called Tanstack Router, which is equivalent to react-router(made by Remix devs) but different from Tanstack Router

  • @gofudgeyourselves9024
    @gofudgeyourselves9024 3 месяца назад +2

    U look like Ben foakes