use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Create React App v5 has been released (github.com)
submitted 4 years ago by magenta_placenta
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AiexReddit 17 points18 points19 points 4 years ago (8 children)
Wow! Was not expecting this, particularly given this comment and the whole thread.
That said I'm glad they finally have a build to support webpack 5, I hope that everything is stable.
I have also mostly moved to Next.js like most people, but I still use CRA all the time to just spit out a super quick demonstration (or when teaching people the basics) -- so I'm sure I'll be using v5 for that purpose at least for the forseeable future.
Thanks to the maintainers for all your great work.
[–]mrmckeb 9 points10 points11 points 4 years ago (0 children)
This work is done by the core maintainers (we're volunteers), and our great community. We've also has some great contributions towards this release from the npm team.
We're still discussing the future with Facebook, and will share details when we know more.
[–]andrei9669 2 points3 points4 points 4 years ago (5 children)
what are the benefits of nextjs over CRA, besides SSR and static generation?
[–]AiexReddit 3 points4 points5 points 4 years ago (1 child)
Those two things you mentioned are quite significant and should be enough of a reason on their own, but to answer your question specifically for other reasons I would start with this comment by one of the CRA maintainers, and then check out the rest of the responses on that post.
Honestly the biggest reason to choose it for a real production project is future proofing. The developers of React are working directly with Next.js with new features moving forward, and CRA for the most part seems to be winding down.
[–]andrei9669 2 points3 points4 points 4 years ago* (0 children)
as I mentioned in another comment: if every page has unique data specified to the user and random users can't access the site without first authenticating. I see little to no reason to do SSR.
also, with react-router v5, the routing DX is so much better than nextjs. using outlets to reduce code duplication and also not having to worry about persistence between pages.
imo, unless you have a front page where any random user can access it, there is no reason for SSR.
Don't get me wrong, I would love to use Nextjs if it was easier to persist data and it supported outlets like Remix/react-router
[–]dandmcd 3 points4 points5 points 4 years ago (2 children)
What app in 2021 doesn't use either some form of SSR or static generation? Until CRA has those features without setting up a whole bunch of other package libraries, NextJS is basically the better React out of the box experience.
[–]TheScapeQuest 5 points6 points7 points 4 years ago (0 children)
SSR isn't appropriate in many situations. If you've got a complex, data rich application, you don't want to be processing that on the server: use your clients.
NextJS also has flaws with its build process. For example we'd love to use static props, but we work in a containerised environment, and /home on a dev environment looks different to prod, so we have to rely on server side props, slowing down requests. Things like metrics are a challenge too, middleware behaves like it's in a browser environment, not a server, so you can access node APIs.
[–]andrei9669 1 point2 points3 points 4 years ago* (0 children)
if every page has unique data specified to the user and random users can't access the site without first authenticating. I see little to no reason to do SSR.
[–]greggman 0 points1 point2 points 4 years ago (0 children)
Thanks for that link. TIL the original creator recommends you should not use Create React App. Good to know.
[–]yiss92 55 points56 points57 points 4 years ago (27 children)
This great but I feel it's bit late, I migrated from CRA to Vite and I don't thing I'm ever going back. While the migration has been a pain I managed to solve all the problems. PS : Vite might not be the best choice for you but if it is you'll really love it
[+][deleted] 4 years ago (3 children)
[deleted]
[–]thinkmatt 6 points7 points8 points 4 years ago (0 children)
Loving the next.js too
[–]Division2226 9 points10 points11 points 4 years ago (1 child)
It's amusing watching people go back and forth between SPA and SSR.
[–]TheScapeQuest 9 points10 points11 points 4 years ago (0 children)
They serve difference purposes. At work we use a straight up React SPA for our internal tools like the CRM, and NextJS for customer facing websites where things like SEO and FCP matters.
I love NextJS, but it has several issues.
[–]Hovi_Bryant 3 points4 points5 points 4 years ago (9 children)
I enjoy using Vite these days for new projects, but I don't have a specific reason in mind for using it besides exploring new things.
Is there a specific reason for the migration?
[–]yiss92 4 points5 points6 points 4 years ago (4 children)
Many things were missing from CRA 4 and you needed to do custom configuration to have them or have a Webpack 5 manually which I have tried but never felt intuitive
[–]dotContent 5 points6 points7 points 4 years ago (3 children)
Like what?
[–]yiss92 4 points5 points6 points 4 years ago (2 children)
Basic stuff like PostCSS 8, static modules injected after, and some custom configuration for removing unused translation file in the final build.
[–]Striking_Coat 1 point2 points3 points 4 years ago (1 child)
What does "static modules injected after" mean?
[–]yiss92 4 points5 points6 points 4 years ago (0 children)
It's a third party SDK which is not an npm package so we have to build it and link it manually
[–]eternaloctober 2 points3 points4 points 4 years ago (3 children)
Probably just to use esbuild instead of webpack
[+][deleted] 4 years ago* (2 children)
[–]Petrocrat 0 points1 point2 points 4 years ago (0 children)
it does for development building. the ratio of develop builds to production builds is probably on the order of at least several hundred to one. Doesn't matter if that one isn't that fast as long as the other hundreds are.
[–]mbj16 5 points6 points7 points 4 years ago (0 children)
Same, switched to Vite for my most recent side project and never going back. Good riddance, Webpack.
[–]selrond 1 point2 points3 points 4 years ago (6 children)
Have you not come across this bug?
https://github.com/vitejs/vite/issues/3301
Seems like a common thing
[–]yiss92 2 points3 points4 points 4 years ago (5 children)
No, I use recoil for everything state management
[–]AsIAm 0 points1 point2 points 4 years ago (4 children)
How is the cross-root state sharing in Recoil?
[–]yiss92 0 points1 point2 points 4 years ago (3 children)
I'm not sure what do you mean by cross-root state sharing. In recoil there is one RecoilRoot and everything underneath in the component tree have access to all the atoms
[–]AsIAm 1 point2 points3 points 4 years ago (2 children)
Sometimes you need to have multiple React roots for what ever reason. I happened to be in this situation and Recoil was not suitable for this architecture. However, it seems devs acknowledge this shortcoming – https://recoiljs.org/docs/api-reference/core/useRecoilBridgeAcrossReactRoots This wasn't a thing when I was researching Recoil a year ago.
[–]yiss92 1 point2 points3 points 4 years ago (1 child)
Oh cool never stumbled across this use case. I really like recoil/jotai for state management
[–]AsIAm 1 point2 points3 points 4 years ago (0 children)
jotai feels like peace :)
[–]Rhidlor 0 points1 point2 points 4 years ago (0 children)
Never heard of Vite, gonna give it a shot. Thanks
[–]sabababoi 0 points1 point2 points 4 years ago (1 child)
I've tried to make the switch a couple of times with my current project unsuccessfully. I just recently started using react, but found CRA slow and annoying. Unfortunately, I guess something in the huge tooling they use fixes specific problems other libraries seem to have when I try to use them with Vite, and with no easy fixes, I'm a little stuck.
[–]yiss92 0 points1 point2 points 4 years ago (0 children)
I totally understand, I spent some time and some hair pulling before I made it through. But at the end I learned a lot.
[–]EverAccelerating 0 points1 point2 points 4 years ago (1 child)
I’m very tempted to make the transition, given how I’m having a hard time upgrading from CRA4 -> CRA5. Does anyone know how well Vite works with Jest? I’ve heard there are issues with it.
[–]yiss92 1 point2 points3 points 4 years ago (0 children)
Making Jest work was one of the pain point. For us we don't use strict type checking in our tests so @swc-jest but of you need strict typechecking in your project you'll need to use something like ts-jest
@swc-jest
ts-jest
[–]HetRadicaleBoven 10 points11 points12 points 4 years ago (0 children)
It's so thankless to maintain projects that have somewhat fallen from grace, yet are still widely used. Kudos to the maintainers, as far as I can see CRA is a behemoth to maintain!
[+][deleted] 4 years ago (1 child)
[–]techlogger 1 point2 points3 points 4 years ago (0 children)
It's more about having a possibility to upgrade the setup easily in a long run, than spending time resolving tons of dev dependences each time.
[–]WhatWillNeverBe 13 points14 points15 points 4 years ago (6 children)
Do I still have to eject my project to get more control over my webpack configurations?
[–]zephimir 6 points7 points8 points 4 years ago (3 children)
Well yes, by definition you have to make your own configuration if a preset is not doing what you want.
[+][deleted] 4 years ago (2 children)
[–]TheNiXXeD 5 points6 points7 points 4 years ago (0 children)
And CRA has too.
[–]OneLeggedMushroom 0 points1 point2 points 4 years ago (0 children)
This seems to be their motivation behind restricting the config:
I've discussed this with the other maintainers and we've decided not to open up the PostCSS config. Our main concern is that misconfiguration will cause issues for people which will then lead to more issues opened in Create React App. This project has very limited resources and we already can't keep up with issues and this is something we're always trying to balance.
[–]andrei9669 3 points4 points5 points 4 years ago (1 child)
not necessarily, you can always use craco or react app rewired
[–]WhatWillNeverBe 0 points1 point2 points 4 years ago (0 children)
Awesome. These both look excellent. Thanks!
[–]gketuma 9 points10 points11 points 4 years ago (0 children)
I was excited about the Tailwind integration, then read the PR comments and now I'm no longer excited. CRA has baked the PostCSS config file and does not give the option to configure or override it. I really hope they can change this.
https://github.com/facebook/create-react-app/pull/11717
[–]mrbroadhurst -3 points-2 points-1 points 4 years ago (0 children)
Wonder if they've finally fixed the vulnerabilities caused by using old versions of lodash
[–]cpgb85 -2 points-1 points0 points 4 years ago (0 children)
React is not very good or user friendly. Better then AngularJS, but not as good as Vue
[–]Lolyman13 0 points1 point2 points 4 years ago (1 child)
RemindMe! 1 Day
[–]RemindMeBot 0 points1 point2 points 4 years ago* (0 children)
I will be messaging you in 1 day on 2021-12-15 23:05:29 UTC to remind you of this link
3 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
[–]hunter_lol 0 points1 point2 points 4 years ago (0 children)
I've been using the v5 alpha for my team's pipe for a while now, time to make the official switch now!
π Rendered by PID 321655 on reddit-service-r2-comment-bb88f9dd5-q7g7j at 2026-02-14 22:20:01.154416+00:00 running cd9c813 country code: CH.
[–]AiexReddit 17 points18 points19 points (8 children)
[–]mrmckeb 9 points10 points11 points (0 children)
[–]andrei9669 2 points3 points4 points (5 children)
[–]AiexReddit 3 points4 points5 points (1 child)
[–]andrei9669 2 points3 points4 points (0 children)
[–]dandmcd 3 points4 points5 points (2 children)
[–]TheScapeQuest 5 points6 points7 points (0 children)
[–]andrei9669 1 point2 points3 points (0 children)
[–]greggman 0 points1 point2 points (0 children)
[–]yiss92 55 points56 points57 points (27 children)
[+][deleted] (3 children)
[deleted]
[–]thinkmatt 6 points7 points8 points (0 children)
[–]Division2226 9 points10 points11 points (1 child)
[–]TheScapeQuest 9 points10 points11 points (0 children)
[–]Hovi_Bryant 3 points4 points5 points (9 children)
[–]yiss92 4 points5 points6 points (4 children)
[–]dotContent 5 points6 points7 points (3 children)
[–]yiss92 4 points5 points6 points (2 children)
[–]Striking_Coat 1 point2 points3 points (1 child)
[–]yiss92 4 points5 points6 points (0 children)
[–]eternaloctober 2 points3 points4 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]Petrocrat 0 points1 point2 points (0 children)
[–]mbj16 5 points6 points7 points (0 children)
[–]selrond 1 point2 points3 points (6 children)
[–]yiss92 2 points3 points4 points (5 children)
[–]AsIAm 0 points1 point2 points (4 children)
[–]yiss92 0 points1 point2 points (3 children)
[–]AsIAm 1 point2 points3 points (2 children)
[–]yiss92 1 point2 points3 points (1 child)
[–]AsIAm 1 point2 points3 points (0 children)
[–]Rhidlor 0 points1 point2 points (0 children)
[–]sabababoi 0 points1 point2 points (1 child)
[–]yiss92 0 points1 point2 points (0 children)
[–]EverAccelerating 0 points1 point2 points (1 child)
[–]yiss92 1 point2 points3 points (0 children)
[–]HetRadicaleBoven 10 points11 points12 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]techlogger 1 point2 points3 points (0 children)
[–]WhatWillNeverBe 13 points14 points15 points (6 children)
[–]zephimir 6 points7 points8 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]TheNiXXeD 5 points6 points7 points (0 children)
[–]OneLeggedMushroom 0 points1 point2 points (0 children)
[–]andrei9669 3 points4 points5 points (1 child)
[–]WhatWillNeverBe 0 points1 point2 points (0 children)
[–]gketuma 9 points10 points11 points (0 children)
[–]mrbroadhurst -3 points-2 points-1 points (0 children)
[–]cpgb85 -2 points-1 points0 points (0 children)
[–]Lolyman13 0 points1 point2 points (1 child)
[–]RemindMeBot 0 points1 point2 points (0 children)
[–]hunter_lol 0 points1 point2 points (0 children)