Create React App is Dead?
Have you used create-react-app
?
Probably EVERYTIME you have created a React application.
Well, there are a few problems with using it. As is with all legacy features of any framework after some time.
Why not create-react-app
?
We have been taught since the Stone Age that starting development in React is easy with CRA command.
And yes, it is easy. But what is the need of the world now?
Easier and Faster.
Here is where CRA fails. You would have notice it yourself. Everytime you initialize a react application, you run the CRA command. Node starts installing packages, and then :
You have a brand new application.
But wait, did you know there are options that do this faster and better?
Well, this is what this article is all about.
The modern frameworks that provide the functionality of creating react applications faster and more sophisticated.
1. Vite
One of the most used modern frameworks used for creating react applications is Vite.
Vite is relatively faster while creating react applications, while decreasing the server startup time as well.
You can also see the popularity on npm :
It is as easy as writing the following command :
npm create vite@latest
This works almost in the same way as CRA, but definitely faster.
2. Gatsby/Astro
One of the latest trends is static site generation. SSG uses the concept of pre rendering the pages and serving them to the user as static websites that don't have reactivity like React.
Simple use cases are blogs or a marketing page, where the data doesn't need to be updated based on user reactions.
Here frameworks like Gatsby or Astro come in. They compile the React based code and serve plain HTML, CSS and Javascript pages.
Now, let's move on to frameworks that a more on the full stack side of things.
3. NextJS (My favorite)
You might have heard about NextJS more than any other options in this article.
There is a reason for this. One of them is the wide range of functionalities that NextJS provides.
- Pure server side generated static pages
- Hybrid pages that are static but react to client side interactions like React
- Functionality to create routes without using any library like React Router
- Having the API and the client side pages on the same server
Well there you have it, why NextJS.
Comment below if you would like a series on creating NextJS websites from scratch.
4. Remix
Last on the list, but definitely not the least is Remix.
One of the newest JS Frameworks in the market.
Now, what is RemixJS? As put by Fernando Doglio :
Remix is a brand new full-stack framework for developing web applications. I call it “full-stack framework” because it lets you code for the front-end and the back-end at the same time. Yes, you're using JavaScript for everything, with a very React-ish flavor to your code.
Mind blown?
Well mine definitely was.
Even better - Shopify recently acquired it. Though there are other frameworks also providing similar features, they do not have the backing of such a giant as Shopify.
That's it for today guys.
Which one was new for you? And which would you love to try? Would love to talk on this more.