Don't Use Create React App in 2023

Поділитися
Вставка
  • Опубліковано 20 сер 2024
  • My last Create React App video was way too long and I wanted to start a new series so...yolo.
    Create T3 App: create.t3.gg/
    Vite: vitejs.dev/
    Astro: astro.build/
    Remix: remix.run/
    #t3stack #fullstack #webdevelopment
    ALL MY VIDEOS ARE POSTED EARLY ON PATREON / t3dotgg
    Everything else (Twitch, Twitter, Discord & my blog): t3.gg/links

КОМЕНТАРІ • 102

  • @Hexalyse
    @Hexalyse Рік тому +106

    I started project at work a bit over a year ago based on CRA. Back then this is the thing I knew that was "recommended way to start a SPA react app". Vite etc were appearing but I was afraid it wouldn't support everything we needed.
    I finally switched those apps from CRA to Vite last week. Even on the base skeleton app we use to start new PoC/demos based around our technology, it went from many seconds to literally 300ms, to build the production version of the app. It's above a factor of 10. The HMR speed is insane too. From a couple seconds to virtually instant updates.
    All thanks to your previous video where you explained ppl should stop using CRA, and that Vite provided the same features and a better developer experience. I just had to add a package to handles "externals" with Vite (it was a sine qua none condition for our projects), and done. No more react-scripts, no more complex webpack configuration.

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

      This story makes me way too happy and I really hope others can have the same wins from this vid 🙏

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

      @Mr Nobody how hard was it to make the switch from Webpack to Vite?

  • @ninhdang1106
    @ninhdang1106 Рік тому +29

    tfw ThePrimagen has become the real face of Rust, not the crab or the R logo 😂

  • @MitchKarajohn
    @MitchKarajohn Рік тому +23

    When CRA first came out it was such a revelation, no longer having to manually setup/update webpack. Even though I had become quite the proverbial wizard at it, moving over to CRA was a no-brainer. Now, the problem is, people at my org are not as easily convinced that moving over from CRA to something better is worth it as it was when we moved over to CRA

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

      because it probably isn't

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

      @@aerocodes don't know man, I think the outrageous speed difference between say CRA and Vite is pretty worth it, IMO.

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

    Theo is wearing the same shirt in the suggested video thumbnail. Obvious room for improvement in the algorithm.

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

      This is my fault tbh

  • @universecode1101
    @universecode1101 Рік тому +32

    I have used CRA many times and I have seen that it installs a lot of stuff in the project. With VITE the project is lighter, starting you can decide what and whether to install along the way. Of course if you use Next, create-next-app is great, but whether to use it or not depends on the project.

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

    I also started to use Vite due to your reccomendations and I have to say that i am quite impressed with it so far. It's fast and it works surprisingly well without a lot of attrition

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

    Short , Simple , Informative and well dressed theo. Who said the perfect video doesn't exist 👏👏

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

    super excited to see what Turbopack can do! Thanks so much for the awesome video!

  • @3ndoku5h
    @3ndoku5h Рік тому +2

    its kind of annoying playing peekaboo with your right eye

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

    I don't even remember if CRA was the issue but moving to vite / t3 for several projects now has got me doing what I want to do when writing code, and much much less of solving issues that have nothing to do with what I've written.

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

    This advice is bs. The HMR difference between Vite & Webpack 5 is like 0.5s on a project with 250 components. The diff is even smaller if you work on a proper machine instead of €100 potato. And then Webpack 5 is 2-3x faster to start + has built in support for module federation should you need it.

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

    Oh man thank you! Finally a short but thorough explanation.

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

    Subscribed! I found you through how well you held yourself to in a recent high profile tech conversation. You’re tech knowledge is amazing!

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

    Nice and to the point :) I think if your main problem with the tools is the build speeds, then there's not much more to say. I also enjoyed the longer CRA video, for what it's worth. But it's definitely harder to consume something that long.

  • @daniel.ehrhardt
    @daniel.ehrhardt Рік тому +3

    esbuild is still not stable

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

      For production builds yes - for dev environments it's essential.

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

    A valid reason imo to use CRA over Vite is for the support of module-federation. I know Vite also has a module-federation plugin, but it does not support all the features we needed. The plugin only support hot-reload in the host app for example. Also good dependencies sharing was lacking at the time.
    We used CRA to get all the basic config and override it with CRACO to apply module-federation to the config.

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

      Why use CRA and CRACO when you can just use webpack normally? CRACO should be used when you're in too deep on a CRA project, but if you know you need module federation up front you should own your whole build config

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

      @@TheBswan because CRA gives good default setup, we tweaked it more with CRACO then just module-federation.

  • @aryanA-cm2fb
    @aryanA-cm2fb Рік тому +1

    Daliban operative DETECTED

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

    There's an app I maintain at work that uses CRA and uses a "fetch-everything-then-render" pattern where we make a few API calls on mount that return massive payloads which contain every piece of data the app could possibly need and then use WebSockets to keep state in sync with the server.
    THE DX IS SOOOO BAD! I WAIT LIKE 5 SECONDS EACH FILE CHANGE TO SEE IT APPEAR ON THE PAGE!

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

    theo looks like roadrunner

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

    Any Hack Reactor grad knows very well what a nightmare it is to set up Webpack manually.
    Regarding CRA, I think you said it best on your last video about CRA: "CRA is a legacy project and should be treated as such."

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

    I'm creating my first ReactJS app in VS Code using Create-React-App (learning ReactJS), been waiting for at least 15minutes while it's doing... something.
    What do I see while browsing for tutorials? A three minute, twenty-one second video telling me I done goofed.
    Thanks Theo!

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

    Recently joined a project where the webpack configs were custom written… Lighter modules but longer response time, which isn’t a valuable trade off.
    I find myself waiting 6+ secs for the rebundling, and it sucks so much esp cos I’ve been mostly living in Nextjs land for months now

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

    Beginner Laravel developer, but i can't miss your videos. I really like how you break things down.

  • @0xtz_
    @0xtz_ Рік тому +1

    My problem with cra is : speed I don't have time to wait for it to create ......, Vite is just 1min I'm ready to start doing my work

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

    Great video, I’m not sure how I found your channel but your takes are interesting and keep me hooked!

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

    I just started my latest project using Vite and it’s like a breath of fresh air. Simple install lightning fast updates.

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

    Great video - I appreciate the quick explanation about create-react-app, why it is like it is, and why it was made. Hats off to the people who made it, no doubt their tool did something huge for the developer base, but as has been mentioned, times have moved forward, and new tools exists to make the dev experience better - but no doubt CRA has huge impact in regards how those tools work.

  • @st-jn2gk
    @st-jn2gk Рік тому +2

    MongoDB: The real problem would be AWESOMMMEE (i need help convincing my boss to use postgres/mysql)

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

    A question I think about a lot, one of the things that make t3 stack so attractive, is that you have everything connected and integrated.
    But what would you do if you want the same web app you developed with t3 stack as a native IOS/android app?
    Would you rewrite everything with react native? Even though the UI is the same?
    or maybe use Ionic with capacitorjs to just render the whole application inside a web view( which can result in poor performance but one code base stays)?
    P.S:
    I know you can build with flutter a web app and a native app at the same time, but the performance of flutter is kinda sh!* overall, so that’s an option.
    P.S.2:
    Asking because I have a new project I have to build which I really want to use t3 stack on, but we also need to build an application and we don’t have time to spend on coding 2 codebases….

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

      check out create-t3-turbo (for tailwind) or the tamagui expo starter repo

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

    Can you make a video about your thoughts on svelte and svelte-kit?

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

    I loved using vite, but I’m stuck with create react app at work because the front ends I develop are all going to be micro frontends and the vite build processes generates files that I cannot integrate with the frontend wrapper they use.

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

    hairs hanging in front of eyes!! what a style!

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

    I'm seeing a lot of people mention Vite issues when it comes to creating the production build of the app.
    Having a faster dev experience doesn't mean anything to me if the end (bundling) experience is going to be a headache to get working

  • @Guilherme-qk9so
    @Guilherme-qk9so Рік тому +1

    Good shit. As usual

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

    I'm a bit proud that I stopped using CRA in 2018 because of boilerplates and configs what you had to eject sooner or later.

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

    One point: Vite uses esBuild for dev rebuilding, but Rollup for the actual build. Esbuild is faster, but Rollup is better at minifying and cleaning out dead stuff.

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

    I actually thought J was subscribed but I was not. Now I am.

  • @kn-he1ik
    @kn-he1ik Рік тому

    I haven't used cra, but I like webpack's various options and plugins.
    In particular, I think webpack is the best tool for using module federation.
    The biggest complaint about CRA seems to be the part where you have to eject.
    They hide options for custom settings.
    So react is installed separately + webpack + esbuild-loader.
    It seems the best to take the advantages of build speed and webpack at the same time.

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

    I like this *not quite a rant* video.

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

    I still remember moving from Gulp and Grunt to Webpack and thinking "Oh this is an overengineered complicated mess" Webpack never got better.

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

    I would like to see Storybook also move away from webpack or offer an alternative bundler.

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

    The thing is that the javascript community throws projects away too fast. Aways something new, the reason webpack is slow is more a node.js fault than webpack's. Now we decided to throw away webpack to create something new and get rid of all the plugins it contains, I love the t3 stack though, this is just a rant on the js community

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

    Jeez dude, I didn't even notice you're below 100k... Your vids are so nice, I guessed you were several hundred thousands at least

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

    This men can see future

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

    my experience is that porting existing big applications from webpack to vite is almost impossible, especially when you've got a big package.json and multiple entrypoints. ofc I've tried it like 6mo ago so that maybe changed.
    last time emotion was not working properly in dev mode

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

    100% right once again. tutorials on the web really need to stop promoting CRA as well. the faster we can move on from webpack the better.
    i think vite nowadays should be the more standard "default" choice the community should promote for beginners.

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

    That's I use vite js react template with swc!

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

    It did take a long time to compile to update the page in development enviroment using create-react-app, it is time to switch to vite, Thank you very much 🙏🙏

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

    As a frontend developer I don't know what to do now lol

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

    Theo don't you want Module Federation.
    Easily the biggest increment in SPA reactJS tech next steps for making a enterprise scalable front end app.

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

    CRA means, everything will work out of the box. Vite means MVP will work out of the box but some edge cases must be configured.

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

      CRA means everything will work out of the box slow

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

      @@Sybeats and if the end result is buggy or just not working, what's the point of the speed?

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

    At work, working on a project another teammate started few months back on CRA and its so slow and our internal UI library crashes on vite due to legacy IE11 supporting code 😭

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

    One day, I caught a video where you just seemed to talk down to everyone. So I blocked the channel. Then I saw another video of yours through a friend… needless to say, I unblocked the channel and have watched every vid. Sorry for the early judging and thanks for saving my career numerous times 😂😂

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

    you people aren.t maddened by those 6 vunerabilities they haven't fixed an year later , it ruins the aesthetic and dependabot will keep screaming at you

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

    Hey Theo, what are you looking at when you do these videos? It looks like you’re looking off camera at something

  • @user-pe8ir4iy1e
    @user-pe8ir4iy1e Рік тому +3

    Is there a wizard that will tell you what best language, framework etc to use based on a few question?

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

      "Senior Dev"

    • @user-pe8ir4iy1e
      @user-pe8ir4iy1e Рік тому

      @@niorad website?

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

      chat gpt by open ai

    • @user-pe8ir4iy1e
      @user-pe8ir4iy1e Рік тому

      @@nikkoazz thinking more about me answering questions. Chatgtp doesn't ask questions

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

      Fireship had a video ~4 months ago comparing different js frameworks which might help you a bit.

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

    Hey, Theo! Do you plan to launch create t3 app for React Native someday?

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

    Any thoughts on svelte kit 1.0 for ssg and SSR? Specially the way they load data both on client and server

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

    Is the dev server faster with create-t3-app? One of my biggest gripes with CRA and, I'm assuming, webpack, is that the dev server that auto-reloads on code change is ridiculously slow.

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

    Do you have ~8 pairs of headphones in the background?

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

    was that intro a gmm reference? lol

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

    Remix is wonderfull choice

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

    Didn't it was released in 2016?

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

    Very cool video

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

    In 99% of cases Create-React-App is the best choice, so stop saying that "we should stop using it". It's like saying that we should all stop eating carrots, because there are people out there allergic to it.

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

    I can see Remix and NextJS having alternatives for webpack, what about Vite? What does it use to replace for webpack?

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

      Vite itself is a replacement to webpack. It's a build tool not a framework.

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

      @@nexxel I see, thank you

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

    Theo I really like that shirt. Can you respond to my comment and tell me where you got it?

  • @martinWein
    @martinWein 21 день тому

    Liar ! Use it people . Use it use it

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

    Did NPR Radio buy Theo?

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

    Me waiting for 5 mint to load my dev server

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

    face { overflow:hidden; } don't cover the pretty face pls

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

    ill stick to cra

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

    we used CRA at work years ago. i want to transition to Vite now but it dosent seem too easy to migrate old projects :/

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

    Don't use react in 2023

  • @martinWein
    @martinWein 22 дні тому

    Nonsense

  • @Joseph-do9ue
    @Joseph-do9ue Рік тому

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

    svelteKit

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

    I'm sorry you're still having to address this 🥲