Starting out: Vite or Next JS for React JS

Anyone looking to become a full-fledged front-end developer will come across something called a framework. A front-end framework creates a structure to help developers efficiently create a user interface.

What does that have to do with this article? A…


This content originally appeared on DEV Community and was authored by TobiLean

Anyone looking to become a full-fledged front-end developer will come across something called a framework. A front-end framework creates a structure to help developers efficiently create a user interface.

What does that have to do with this article? A common misconception is that React is a framework. React can actually be seen as a JavaScript library. The difference is not gaping, but it is good to note it to avoid confusion. The React library provides a collection tools that help developers create and render more responsive and interactive user interface.

Photo by RealToughCandy.com: https://www.pexels.com/photo/hand-holding-react-sticker-11035471/

In this article I will compare two popular React JS tools, Vite and Next JS. Vite is a react bundler and build tool, and Next JS is a JavaScript framework built on react. We are we comparing the two because selecting one of them to start with after getting into React JS is a common choice among beginner front-end developers.

About Vite

Vite was created about 4 years ago and since then it has gained a lot of track making it one of the common choices for developers. I started to use Vite after I tried my hands with create react app, and my experience so far has been very smooth.

About Next JS

Next JS is a web development framework based on React JS. It was initially released in 2016 is currently one of the more popular React JS frameworks wit over 1 million monthly developers according to Next JS (see: https://nextjs.org/blog/next-14-2).

Differences and Similarities

How do these two compare? While the most obvious difference between them is that Vite is a bundler and build tool, which means it helps tie your various resources (CSS, HTML, JavaScript etc.) into a single file and helps to scaffold your React JS project. But Next JS does more than that, it handles, building, bundling, routing, optimization etc. It can be used for server-side rendering and SEO, it is a framework. Clearly Next JS is more powerful and has some extra things built on top React JS. But does more power equal better?

Some technical differences

Besides the technical differences, there are other factors like their learning curve, and community support. They both have a reasonably sized community, good documentation and many friendly non-toxic developers (based on my experience). Although Next JS has been here longer and has more features, so it tends to be the better known of the two. There is a difference in how easy it is to learn and practice though. Vite is regarded be many as a “proper” way to learn react. It doesn’t have any additional functionality in the same manner that Next JS does. Learning Next JS on the other hand is more demanding and feels like a whole different environment.

The choice

So, which one should beginners in React JS choose. In my opinion it is always going to be Vite, your can learn React JS starting with Vite, you do not have to necessarily learn React JS using CDN or create-react-app. But going through Next JS first would prove difficult and might not be the best foundation for novice front-end developers.

While delving deeper into your journey into front-end development as a beginner, you would be faced with so many options not even covered in this article and you would have to pick one if you want to stay relevant in this industry as many employers have already long adopted these modern tools and are heavily reliant on them. It has become imperative to at least have basic knowledge in multiple tools and frameworks and master at the very least one of them. With the rising popularity of the React JS library many companies are looking for talent in that area and withing the world of React there are still more frameworks and tools to choose from. If you decide to learn react, I would advise to use Vite over create-react-app and before you learn Next JS (if you decide to).

Conclusion

In conclusion, learning takes time and sometimes as beginners you might need more guidance than just what an article can provide, that is why other than just reading and practicing it is good to join a community or internship program like the HNG internship (https://hng.tech/internship) which offers both an internship and a community which you can have longer access to if you subscribe to HNG premium (https://hng.tech/premium). I myself am taking part of this internship. It is good to surround yourself with people with similar goals, in order to not be alone on your developer journey.

cover photo by Nick Gorniok : https://www.pexels.com/photo/scaffolding-on-building-wall-17925400/


This content originally appeared on DEV Community and was authored by TobiLean


Print Share Comment Cite Upload Translate Updates
APA

TobiLean | Sciencx (2024-06-28T22:28:03+00:00) Starting out: Vite or Next JS for React JS. Retrieved from https://www.scien.cx/2024/06/28/starting-out-vite-or-next-js-for-react-js/

MLA
" » Starting out: Vite or Next JS for React JS." TobiLean | Sciencx - Friday June 28, 2024, https://www.scien.cx/2024/06/28/starting-out-vite-or-next-js-for-react-js/
HARVARD
TobiLean | Sciencx Friday June 28, 2024 » Starting out: Vite or Next JS for React JS., viewed ,<https://www.scien.cx/2024/06/28/starting-out-vite-or-next-js-for-react-js/>
VANCOUVER
TobiLean | Sciencx - » Starting out: Vite or Next JS for React JS. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/28/starting-out-vite-or-next-js-for-react-js/
CHICAGO
" » Starting out: Vite or Next JS for React JS." TobiLean | Sciencx - Accessed . https://www.scien.cx/2024/06/28/starting-out-vite-or-next-js-for-react-js/
IEEE
" » Starting out: Vite or Next JS for React JS." TobiLean | Sciencx [Online]. Available: https://www.scien.cx/2024/06/28/starting-out-vite-or-next-js-for-react-js/. [Accessed: ]
rf:citation
» Starting out: Vite or Next JS for React JS | TobiLean | Sciencx | https://www.scien.cx/2024/06/28/starting-out-vite-or-next-js-for-react-js/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.