2

Create-React-App in 2023 — 5 Future Paths

 1 year ago
source link: https://sebastiancarlos.com/create-react-app-in-2023-5-future-paths-2202d22743c7
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Create-React-App in 2023 — 5 Future Paths

Theo Challenges the React Team. Dan Abramov Responds with Epic Dialectic

1*6o7WT8iNXGsSf5wuxrfnSg.png

“This web of time — the strands of which approach one another, bifurcate, intersect or ignore each other through the centuries — embraces every possibility. We do not exist in most of them.”
― Jorge Luis Borges, The Garden of Forking Paths

Create-React-App (CRA) is a popular open-source library from the React team for starting new React projects.

It has helped countless developers to get up and running quickly and has become the go-to choice for many React projects. It’s an integral part of the React ecosystem, and its popularity shows no sign of abating.

Or does it?

Create-React-App is Unmaintained

In the last few years, CRA has been described as “unmaintained.” This is not only an opinion. It’s an objective fact, as the huge pile of unanswered open issues and lack of commits have made clear that the project is not actively being maintained.

This well-known state of affairs got into the spotlight this week when Theo — a renowned “tech influencer” that I can only describe as “the Platonic ideal of the Lawful Neutral enthusiastic developer” — opened a spicy PR on the new React docs repo, aptly titled “Replace Create React App recommendation with Vite.”

A Challenger Appears

The new React docs, currently in beta, have been universally acclaimed as a masterpiece of technical writing. The influence that they will exert over the world of documentation will be felt for generations to come.

However, their one downfall is that they currently recommend CRA, and Theo’s PR aims to fix that.

Theo’s tweet and PR received thousands of reactions and many replies from every kind of inhabitant of the tech industry, including the memers such as myself.

A torrent of debate unleashed. But the popular opinion seems to agree predominantly on two facts:

  • CRA shouldn’t be recommended, and
  • Vite is indeed a reasonable alternative.

Dan Strikes Back

After more than a week of intense discussion, Dan Abramov himself — someone who needs no introduction for anyone reading this — has stepped in to provide a lengthy answer.

Dan’s answer is so massive, so huge, and so comprehensively reasonable, that everyone reacted positi­­­­­­­­vely. But, surprisingly, his answer does not present a binary yes/no response to the issue at hand. Nevertheless, everyone appears to be much more relaxed about the topic after reading the words of Dan. This, ladies and gentlemen, is true leadership.

Dan’s answer is nothing short of a multidimensional Hegelian dialectic on several interconnected aspects of the evolution of React, most importantly the emergence of meta-frameworks like Next.js, which eventually concludes in the formulation of five possible paths for the future of CRA.

I recommend, dear readers, to read Dan’s Leviathan by yourselves. But if you want to know my breakdown of Dan’s possible forking paths into the future, read on:

Path 1: Create a new meta-framework from scratch

Dan suggests the possibility of the React team creating and maintaining their own meta-framework. But he’s quick to admit the unrealistic nature of this scenario, given how much time and effort it would take.

Path 2: Deprecate Create React App, maintain a Vite template

Dan is not a fan of people using the existing Vite template for React, mainly because he wants to have tight control of the technical aspects and because he wants to avoid branding that points to commercial services.

Yet, he says this option is unlikely because the template he would want would be almost as complex as a meta-framework, which is also out of the question.

Path 3: Deprecate Create React App, suggest React meta-frameworks

This would be my favorite option, by the way. Note that the new docs already recommend meta-frameworks like Next and Remix.

Path 4: Make Create React App use a single meta-framework

This would be nice, but Dan wants to avoid picking a favorite one because that would stiffle the rich competition currently happening on the meta-framework space.

Path 5: Turn Create React App into a launcher

This is the option that the React team is currently leaning into:

We could keep Create React App as a command, but turn it into a launcher. It would suggest a list of recommended frameworks, followed by the “classic” framework-less approach being the last option. That last “classic” approach would produce a client-only app like CRA does now (to avoid breaking tutorials), but could eventually move to Vite under the hood.

Memes from the PR

To close all this seriousness, I’d like to share a few of the memes — or funny remarks — that have been posted on the PR:

1*Im2VCCCDTVyM64rK4_Iywg.png
1*UtG4nTAu7u4fluUfGXc6cw.png
1*dRVYNcTW6oM6NaVv3OkEmA.png
1*Ln2zBNUzIz4p0PK7zx8gsQ.png
1*qOp7x-OiuwbqEQZ0XNXVUA.png
1*fn5BM57Q-JmUeEqeZGooPg.png
1*8kQkITWlypj9j4hTVIbglg.png
1*6WIFa2Bn_fLmjGHKkdRMzA.png
1*FnlJJoUD3krEIUtpHefJiA.png
1*zIeFi4TRI2TynMH-5Ag0sA.png

Closing Thoughts

The battle for the future of CRAPP (as I tend to affectionately nickname it) is still ongoing. And it’s safe to say that most of it is in the hands of the very capable people at the React team.

We should keep an eye on the React docs and see how the discussion evolves. In the meantime, remember to guide junior devs into Vite, even if the new docs are unable to acknowledge its practicability at the time.

For my full breakdown of the new React docs, click here:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK