from Hacker News

Sunsetting Create React App

by acemarke on 2/14/25, 7:16 PM with 146 comments

  • by CSDude on 2/15/25, 8:58 AM

    Vite is a direct replacement for CRA but corporate speak makes it sound you need a framework and that corporate speak is funded/influenced by Vercel.

    No you do not need NextJS or any other server side JS for most of the projects. Let's not pretend SPA is dead. Most of you do not need server side rendering and all the complexity it brings.

    Just use Vite. You can decide whether to add Tailwind etc later. React should be left bare bones, and it can recommend frameworks, not make them sound default.

        npm create vite@latest my-app -- --template react-ts
  • by acemarke on 2/14/25, 7:27 PM

    Pleased to say I had a meaningful hand in this :) As some background, this finally happened because:

    - React 19 broke CRA

    - I griped about it loudly on Bluesky (https://bsky.app/profile/acemarke.dev/post/3lggg6pk7g22o) and that started a long debate

    - I filed an umbrella issue describing the specific breakage and recommending an actual official deprecation announcement (https://github.com/facebook/create-react-app/issues/17004)

    - The React team finally took action to fix the CRA breakage, then wrote the blog post, updated the setup docs page, and redid the docs SEO to get Google to stop showing the legacy docs as a search result.

    So, kudos to the React team for making meaningful changes here!

    (It's not _exactly_ what I was hoping for, and I gave them some additional review feedback that they didn't include, but gotta give credit for the actual changes and steps forward!)

  • by mmoustafa on 2/15/25, 8:11 AM

    The article kindly phrases the alternative as “use a framework” and links to a page that has only one actual framework: NextJS.

    I don’t support React pushing a wholesale shift to NextJS as a starting point for every project, given it’s mostly directed by a single private company (Vercel) that have positioned themselves as the default deployment platform for NextJS apps, publish the documentation, and do not shy away from claiming it as their own.

    It has become extremely difficult to distinguish between NextJS features that are community-driven vs profit-driven e.g. api route functions (putting your backend in your React project, so now you will pay them for compute) and NextJS image optimization (famously expensive, and NextJS literally throws warnings if you don’t use it).

  • by Chance-Device on 2/15/25, 8:11 AM

    The complexity of frontend development now makes me want to return to a “back to basics” approach. I just want a server side rendered platform, serving templated html pages to the client, with minimal JS for interactivity. Most projects don’t really require more than this, and the level of unnecessary complexity that has developed over the whole stack, from devops to backend to frontend, is staggering and obviously more a social artefact than a technical necessity.
  • by EdwardDiego on 2/15/25, 8:15 AM

    Okay, I'm verrrry out of date with frontend dev, but didn't React used to be a framework?

    Now they're recommending you use frameworks? That are presumably built on top of React?

    So what is React exactly these days? Feels like it's a shadow DOM renderer that's become a defacto API?

    Like, you could use a component written for one React based framework, in another React based framework, and it'll just work?

    Does React still provide routing and/or state management? Or has that been devolved to frameworks?

    Wait a minute, has React become the J2EE of front-end?

  • by curtisblaine on 2/15/25, 9:02 AM

    I know this is highly controversial, but I don't understand all this sentiment against js frameworks. You can still write vanilla html + js if you don't need hashed assets, css isolation, routers, linting, types, complex state, etc. It won't scale much, but maybe you don't need to scale, you just need to show some simple content with a login page and a "back to top" button. You can absolutely do that without frameworks, and you're better off without.

    Here comes the controversial part: I feel all this sentiment against "frontend complexity" is essentially non-frontend developers wanting cool, highly interactive web apps for their backend and getting bummed when they discover it's hard, specialized work. It is, the browser is a beast, all the layers are backwards compatible and web apps are essentially i/o heavy programs responding to a huge number of async events, trying to render a complex state in response on millions of slightly incompatible platforms. There's no silver bullet for that: it's complex, and the complexity shows in the tooling. But if you don't need that complexity because you just need the browser's lower-interactivity presentation layer, nobody in the world forces you to write an SPA. The problems normally start when you want to "just add a comment section" to your content but then you don't want to reload the page and you discover that it becomes complex soon and writing SPAs comes at a cost.

    Sorry for the rant.

  • by WuxiFingerHold on 2/15/25, 5:17 AM

    Not using React anymore, but it's generally not an easy decision whether to use a framework for a SPA or not. Currently I'm torn between Nuxt and Vue with Vue Router. Nuxt has many fun QoL features, but adds a significant layer of potential issues (bugs, maintainability, leaky abstractions over the core library).

    My tendency is to have an easier life in the future. So I'd probably prefer not using an universal rendering framework like Next, Nuxt, SvelteKit or SolidStart in client side mode and just use the core SPA framework. In case of Vue, it's even easier (but without those QoL features Nuxt provides).

  • by emoII on 2/15/25, 8:08 AM

    It’s not clear to me how using a framework replaces cra, or why cra is a hassle to maintain? I’ve always thought of cra as a way for beginners to quickly wire necessary stuff up to get a working, ”vanilla” react project, something that could be a done in a simple shell script
  • by captainmuon on 2/15/25, 10:19 AM

    I guess it is a good thing that they are now clear about the state of create-react-app. I used it about a year ago because it was still recommended on the React page, and got a lot of deprecation warings. After a lot of googling I realized that people now recommend vite, so that is what I went with (thinking popular = more likely to be supported in future and having more information on the net).

    But TBH I'm not really happy with vite. It seems to be made with a big flagship SPA in mind. If you just want one page, or if you want to include some react in a plain website, it is overkill. It creates dozens of files with potentially hundreds of configuration options. I guess this is typical for the entire JS ecosystem. But sometimes I wish the stuff around React was simpler and more opinionated: Just throw the .tsx files in src, run reactc, and include the output script in your HTML. Maybe add a flag to watch for code changes / hot reload.

  • by lentil on 2/15/25, 8:26 AM

    CRA has been a maintenance burden for my team for the last couple of years due to security vulnerabilities and incompatibilities in old packages.

    We have several React apps (created with CRA) to support, embedded deep inside ASP.NET Web Forms apps (its legacy all the way down).

    We decided to switch from CRA to Vite. It has worked great so far.

    I am happy to see these docs recommend Vite as an option for adding React to existing apps, because at the time this decision was made on my team, it wasn’t very clear what the correct path was for replacing CRA. I don’t think we could have as easily switched to a framework like Nextjs.

    If you are in a similar situation, I would recommend Vite.

  • by askonomm on 2/15/25, 2:36 PM

    Pretty sure CRA was dead a long time ago already and it's very upsetting how little the React team cares about its users. The unwillingness to act on the CRA being broken, the forceful promotion of a pretty locked-in framework Next.js (which is crap without Vercel, so clearly against the open source spirit) as the de-facto way of doing React (is it really? according to stats I've seen, most uses of React are for SPA's).

    I think at work when the next project comes along I'll try and see if we can not do React anymore. I hear good things about Vue.

  • by wiseowise on 2/15/25, 8:55 AM

    Mind boggling that you need a tool to start using a tool.
  • by sureglymop on 2/15/25, 9:23 AM

    This is still a maintenance burden and really a testament to how short lived "the standard way of doing things" in this ecosystem can be.

    I really really hope Astro will not go because that's what I chose to invest in for a while now... but the fear is real.

  • by DandyDev on 2/15/25, 8:23 AM

    So now you need a framework on top of React - itself a framework. Has React really become so complex that mere mortals cannot comprehend it without another abstraction layer on top?

    And the first suggestion for this extra abstraction layer is NextJS, developed by a company with a vested interest to make it hard to run your app on anything else than their own service.

    Seems to me that the time is ripe to disrupt frontend development yet again and introduce a simpler stack.

  • by firecall on 2/16/25, 1:59 AM

    I genuinely thought CRA had been deprecated and development had ended a couple of years ago?

    Edit:

    Maybe it just stopped being a recommendation in the React Docs?

    https://github.com/reactjs/react.dev/pull/5487

  • by Zealotux on 2/15/25, 4:10 PM

    The state of React is so frustrating: plain React doesn't make much sense, but at the same time Next.js is a complete pain in the neck to use. Remix is promising, but young... At that point backend development is much more straightforward.
  • by ianschmitz on 2/15/25, 3:41 PM

    If one of the authors are here, can you please add Ian Sutherland to the thank you note at the bottom? He spent just as much or more of his personal time as Brody and myself. He deserves credit. Thanks
  • by harimau777 on 2/17/25, 1:46 AM

    It feels a little strange to have a framework for your framework. I guess that's just how things are now?
  • by slmjkdbtl on 2/15/25, 3:19 PM

    So is there still an officially recommended way to create a simple static react web page without big fullstack frameworks now?
  • by penguin_booze on 2/15/25, 8:50 PM

    Major frontend framework mandates another framework to use the framework. Framework, framework, framework. Framework.
  • by 8s2ngy on 2/15/25, 8:11 AM

    Interestingly, the Creating a React App page (https://react.dev/learn/creating-a-react-app) does not mention Remix.
  • by aftbit on 2/15/25, 3:21 PM

    Well it had a good run I guess. Frontend churn is so fast.
  • by obiefernandez on 2/15/25, 3:42 PM

    Just use Ruby on Rails. Problem solved.