Don't Use Create React App in 2023

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 101

  • @Hexalyse
    @Hexalyse 2 роки тому +107

    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  2 роки тому +30

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

    • @stefandjokovic5211
      @stefandjokovic5211 2 роки тому +1

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

  • @Dude29
    @Dude29 2 роки тому +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

  • @Noryev1
    @Noryev1 2 роки тому +1

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

  • @universecode1101
    @universecode1101 2 роки тому +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.

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

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

  • @MitchKarajohn
    @MitchKarajohn 2 роки тому +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 2 роки тому +3

      because it probably isn't

    • @MitchKarajohn
      @MitchKarajohn 2 роки тому +1

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

  • @mehulsharmamat
    @mehulsharmamat 2 роки тому +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.

  • @jameshobbs
    @jameshobbs 2 роки тому +4

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

    • @t3dotgg
      @t3dotgg  2 роки тому +2

      This is my fault tbh

  • @julianklumpers
    @julianklumpers 2 роки тому +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 2 роки тому

      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 2 роки тому

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

  • @SilenttempestZX
    @SilenttempestZX 2 роки тому

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

  • @ninhdang1106
    @ninhdang1106 2 роки тому +29

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

  • @skumarspace
    @skumarspace 2 роки тому

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

  • @mpelosi1
    @mpelosi1 2 роки тому

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

  • @tashishsoni9011
    @tashishsoni9011 2 роки тому +2

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

  • @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!

  • @joshuanance664
    @joshuanance664 2 роки тому +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.

  • @rootbeernineteen135
    @rootbeernineteen135 2 роки тому +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!

  • @josephizz4877
    @josephizz4877 2 роки тому

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

  • @DaxSudo
    @DaxSudo 2 роки тому

    I like this *not quite a rant* video.

  • @Guilherme-qk9so
    @Guilherme-qk9so 2 роки тому +1

    Good shit. As usual

  • @flipperiflop
    @flipperiflop 2 роки тому +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.

  • @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.

  • @aryanA-cm2fb
    @aryanA-cm2fb 2 роки тому +1

    Daliban operative DETECTED

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

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

  • @owenwexler7214
    @owenwexler7214 2 роки тому +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."

  • @regexPattern
    @regexPattern 2 роки тому

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

  • @TheIpicon
    @TheIpicon 2 роки тому +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 2 роки тому +1

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

  • @0xtz_
    @0xtz_ 2 роки тому +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

  • @chizidotdev
    @chizidotdev 2 роки тому +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

  • @yashguma
    @yashguma 2 роки тому +2

    theo looks like roadrunner

  • @thepaulcraft957
    @thepaulcraft957 2 роки тому +2

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

  • @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.

  • @kn-he1ik
    @kn-he1ik 2 роки тому

    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.

  • @codedusting
    @codedusting 2 роки тому

    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?

  • @TomAinsworth94
    @TomAinsworth94 2 роки тому

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

  • @st-jn2gk
    @st-jn2gk 2 роки тому +2

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

  • @LucasPachecoF
    @LucasPachecoF 2 роки тому +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.

  • @eango
    @eango 2 роки тому

    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.

  • @aerocodes
    @aerocodes 2 роки тому +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

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

    This men can see future

  • @Yogesh2Love
    @Yogesh2Love 2 роки тому

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

  • @echobucket
    @echobucket 2 роки тому

    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.

  • @cultivatedreams
    @cultivatedreams 2 роки тому

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

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

    its kind of annoying playing peekaboo with your right eye

  • @hakuna_matata_hakuna
    @hakuna_matata_hakuna 2 роки тому +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

  • @maskman4821
    @maskman4821 2 роки тому

    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 🙏🙏

  • @sandking5493
    @sandking5493 2 роки тому

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

    • @nexxel
      @nexxel 2 роки тому

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

    • @sandking5493
      @sandking5493 2 роки тому

      @@nexxel I see, thank you

  • @daniel.ehrhardt
    @daniel.ehrhardt 2 роки тому +3

    esbuild is still not stable

    • @t3dotgg
      @t3dotgg  2 роки тому +4

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

  • @WillDelish
    @WillDelish 2 роки тому

    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 😭

  • @chebrubin
    @chebrubin 2 роки тому

    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.

  • @Rihsto
    @Rihsto 2 роки тому

    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

  • @valhalla_dev
    @valhalla_dev 2 роки тому

    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.

  • @Videx89
    @Videx89 2 роки тому +1

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

  • @robertcolley6926
    @robertcolley6926 2 роки тому

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

  • @user-pe8ir4iy1e
    @user-pe8ir4iy1e 2 роки тому +3

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

    • @niorad
      @niorad 2 роки тому

      "Senior Dev"

    • @user-pe8ir4iy1e
      @user-pe8ir4iy1e 2 роки тому

      @@niorad website?

    • @nikkoazz
      @nikkoazz 2 роки тому +1

      chat gpt by open ai

    • @user-pe8ir4iy1e
      @user-pe8ir4iy1e 2 роки тому

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

    • @interwebslinger
      @interwebslinger 2 роки тому +2

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

  • @DiegoBM
    @DiegoBM 2 роки тому

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

  • @rafadydkiemmacha7543
    @rafadydkiemmacha7543 2 роки тому

    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.

  • @atilla1231
    @atilla1231 2 роки тому

    was that intro a gmm reference? lol

  • @teknolovedigital
    @teknolovedigital 2 роки тому

    Remix is wonderfull choice

  • @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 😂😂

  • @cool_dude_like_really
    @cool_dude_like_really 2 роки тому +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

  • @bryanboateng
    @bryanboateng 2 роки тому

    Very cool video

  • @joostschuur
    @joostschuur 2 роки тому

    Did NPR Radio buy Theo?

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

    Didn't it was released in 2016?

  • @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.

  • @ameer6168
    @ameer6168 2 роки тому

    Me waiting for 5 mint to load my dev server

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

    Liar ! Use it people . Use it use it

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

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

  • @Sillyvan
    @Sillyvan 2 роки тому

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

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

    ill stick to cra

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

    Nonsense

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

    Don't use react in 2023

  • @Joseph-do9ue
    @Joseph-do9ue 2 роки тому

  • @sterin557
    @sterin557 2 роки тому

    svelteKit

  • @texoport
    @texoport 2 роки тому

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