NextJS is a framework to build a full-stack application with features such as server-side rendering using React framework.
NextJS is used to build HTTP web applications to run react code on rendering on the server-side NextJS helps to develop the following different types of applications.
Static sites: In this, HTML files are created at build time and copied this HTML files to CDN or Web server and accessible as static HTML files. - These techniques are used for blogging websites and content related sites that content changes are not frequent
incremental static regeneration (ISR)In this, All the static HTML pages are generated at build time, any new page that is created or updated is generated at runtime, not the build time. Incremental means any new pages that were created or updated or deleted. It does not generate all pages at runtime.
These can be used in eCommerce sites as new products are added or existing products updated with price dailly.
Single Page Applications
The name itself tells that the entire application has a single HTML page that loads on Client-side
It is client Side Rendering.
Initial load time with this approach is very slow
- Server-side rendering and Single Page Application development
- Static Site Generator
- Code splitting
- Build optimizations
- Progress apps features such as offline, prerender
- Supports pre-generate HTML in the server as well as in-browser at build/run time
- It is faster in development and development loading is good
- Image Optimization
- Page Routing
- Better User experience
- Hot Reloading
- It is overkill for simple applications
- Build time is more
- LImited plugins
- State Management is not provided as part of the framework