In 2022, using
create-react-app might not be the greatest, not because it's a bad tool, but because there are other alternatives that offer a lot more and overall are just a lot more practical to use, today I'll be showing you why you should stop using creacte-react-app, and some better alternatives to it too!
Create-React-App or CRA for short, is a tool mantained by FaceBook (like react), that makes the proccess of using and initializing a React app much faster and easier by just running
npx create-create-app my-app in a terminal.
- Get started by just running
npx create-ract-app my-appin a terminal.
- No need to learn extra stuff just to start using React.
- You can rely on using the built-in
react-scriptsto build your app.
First of all, you might not care about this, but it is very slow, sure it only takes one command on the terminal, but that one command also takes a long time to set up. And while this can be an advantage for some people, there isn't really configuration apart from setting the name of the app (which is actually optional), and it's also not a good practice to use a blind setup, which is essentially just running
npx create-react-app . without really knowing what it is doing, and while it might seem like something small, it can lead to a very bad and dangerous habbit.
/vit/, is simply amazing. It is fast, allows for both ready-to-go configuration that is easy to change, and essentially just solves all the problems that CRA has, and even has some additional features too!
It is super easy to get started with Vite and there is really no hard learning curve either. If you want to learn more about all the awesome things Vite can do, Check out this repo.
Next up (get it), we have NextJS. I LOVE NextJS, especially for bigger projects, some of my favourites from NextJS include:
- Good SEO (unlike CRA)
- Amazing preformance
- Good for projects that can scale.
it's just a must-try if you are building any type of dashboard, interactive UI, static websites, or even just single web pages. A great example of how next is used is by looking at some famous companies like Netflix that have used it!
CRA is not practicalin 2022, there are wayyy better options that allow for even more features than CRA (and look good on a resume) and it isn't even that hard to learn all of these new technologies.