Next.js - Overview



By using Next.js, you can create robust react based application quite easily and test them. Next.js is created by Vercel, which is a cloud based platform to help the developer to develop application, deploy and scale-up the applications as well.

What is Next.js?

Next.js is React Based framework with server side rendering capability. It is very fast and SEO friendly. Next.js comes with a lot of advantages that React was lacking.

Advantages of Next.js over ReactJS

  • Hot Code Reload Next.js server detects modified files and reloads them automatically.
  • Automatic Routing: No need to configure any url for routing. files are to be placed in pages folder. All urls will be mapped to file system. Customization can be done.
  • Component specific styles: The styled-jsx provides support for global as well as component specific styles.
  • Server side rendering: React components are pre-rendered on server hence loads faster on client.
  • Node Ecosystem: Next.js being react based gels well with Node ecosystem.
  • Automatic code split: Next.js renders pages with libraries they need. Next.js instead of creating a single large JavaScript file, creates multiples resources. When a page is loaded, only required JavaScript page is loaded with it.
  • Prefetch: Next.js provides Link component which is used to link multiple components supports a prefetch property to prefetch page resources in background.
  • Dynamic Components: Next.js allows to import JavaScript modules and React Components dynamically.
  • Export Static Site: Next.js allows to export full static site from your web application.
  • Built-in Typescript Support: Next.js is written in Typescripts and provides excellent Typescript support.

History of Next.js

Next.js was create by Vercel(formerly ZEIT) in 2016 to bridge the gap in ReactJS ecosystem. From 2016 to till now Next.js improved a lot as well. the current stable Next.js version is 15.0.3 (7th November 2024).

Next.js Versions

Year Version Key Features
2016 Next.js 1.0.0 (October) Initial release
2017 Next.js 2.0.0 Added automatic code splitting
Next.js 3.0.0 Introduced dynamic imports
Next.js 4.0.0 Added zero-configuration TypeScript support
2018 Next.js 5.0.0 Added webpack 4 support
Next.js 6.0.0 Improved error handling
Next.js 7.0.0 Added Webpack 4 optimization features
2019 Next.js 8.0.0 Introduced serverless mode
Next.js 9.0.0 Added built-in zero-config TypeScript support, automatic static optimization
2020 Next.js 9.3 Introduced getStaticProps and getStaticPaths
Next.js 10.0.0 Added built-in Image Component, Automatic Image Optimization
2021 Next.js 11.0.0 Introduced Webpack 5 support, Script optimization
Next.js 12.0.0 Added Rust compiler, middleware, React 18 support
2022 Next.js 12.1.0 On-demand ISR (Incremental Static Regeneration)
Next.js 12.2.0 Improved middleware features
Next.js 13.0.0 Introduced app directory, Turbopack (alpha), new Image component
2023 Next.js 13.4 App Router stable release
Next.js 14.0.0 Improved server actions, Partial prerendering
Next.js 15.0.3 React 19 support, and a stable release for Turbopack in development.

How Does Next.js Work?

Next.js supports both Server-Side-Rendering and Client-Side-Rendering. So you can decide which one is required in your application. Depending on the situation it helps with SEO and quick access to your application.

Please check the below diagram to get the idea of - "How Next.js works under the hood?" We will explain all these steps in this tutorial.

NextJS Working

Advertisements