This project serves as an introduction track to learn Next.js.
Next.js is an opinionated React framework built by Vercel, what it offers out-of-the-box is:
- no config solution
- pre-defined project structure
- built-in routing solution (very similar to
react-router
) - enables server-side render of React components with both SSR and SSG capabilities
- RESTful API creation
- and other features described in the official website
what Next.js is not/not providing:
- state management
- CSS styling solution
- native integration with popular CMS
- any sort of database
Static Site Generation is a technique that allows the creation of different static .html
files at build time. This is useful if you want very fast-loading projects that can be hosted on whatever static hosting provider (Github Pages, Firebase, Netlify, etc...), however this means that the project is unable to handle dynamic data on server side without a new build.
Server Side Render on the other side allows you to deploy complete dynamic applications that may request new server-side render of the content at request time, which is quite popular for complex application that requires pulling data from different sources before displaying the content, as many Ecommerce platforms. In this case the final build can be deployed only on platforms that offers Node.js hosting.
Both solutions are usually more efficient and reliable than regular client-side SPAs due to the fact that by rendering on the server we have much more control of the output.