About Next.js
It is a React framework for production.
How React lacks ?
Not possible to build a full feature rich application ready to be deployed for production.
React is only responsible for the view layer of the application, and we spend much time of other features like routing, styling , auth etc.
Why Next.js ?
It's a package that uses React for building user interfaces but it also comes loaded with lot more features that enable you to build full fledged production ready application.
Loaded with features like routing, styling, auth, bundle optimization.
No need to install additional packages.
It simplifies the process of building a react application for production. Some of the are listed below :
- File based routing - No need of thiord party routing package.
- Pre-rendering - Generates html for each page in advance, instead of having it all done by client side javascript. This results in better performance and SEO
- API routes - Might come as a surprise but you can actually create APIs using next.js.
- Supports CSS modules - Saves you the time of choosing a CSS library.
- Authentication - Supports multiple authentication methods.
- Dev and Prod build system - Provides well optimized dev and prod build system so you can focus more on the code.
Pre-requisites to get started
- HTML, CSS, JavaScript Fundamentals
- ES6+ Features
- React fundamentals