There's a new version of Next.js that focuses on static site generation. Next.js is an open-source toolkit for universal, server-rendered (or statically pre-rendered) React.js applications.
Next.js is described as an intuitive page-based routing system with support for dynamic routes. It automatically statically optimizes pages when possible, and carries out server-side rendering of pages with blocking data requirements. It has client-side routing with optimized page prefetching, built-in CSS support, and support for any CSS-in-JS library. API routes are used to build your API with serverless functions, with the same simple router used for page, and it is customizable with community plugins and with your own Babel and Webpack configurations.
[画像:nextjs]
The first change to the new release is the addition of new data fetching methods that add built-in optimized static generation. The team behind Next.js says it is the first hybrid framework, letting you choose between static generation (SSG) or server-side rendering (SSR) on a page by page basis. Next.js 9.0 introduced the concept of Automatic Static Optimization, meaning when a page doesn't have blocking data fetching requirements, it will be automatically rendered to HTML at build time. Even with blocking data fetching, you might want to render a page to static HTML at build time, though.
The new release adds two new data fetching methods: getStaticProps and getServerSideProps, along with include a way to provide parameters to statically generate static pages for dynamic routes: getStaticPaths. The new methods provide a clear distinction between what will become SSG vs SSR. The new release also adds a preview mode that can bypass statically generated pages to display drafts from a CMS.
There's now built-in Sass support for global stylesheets, and applications can now directly import .scss files as global stylesheets. Built-in Sass CSS module support for component-level styles has also been added. This makes use of the .module.scss convention, meaning locally scoped CSS can be imported and used anywhere in your application. The runtime size for all Next.js applications has also been reduced through optimizations.
[画像:nextjs]
More Information
Related Articles
Next.js 5 Improves Webpack Support
TypeScript 2.7 Improves Type Inference
To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
AI Champion Ship Now Open
07/11/2025
The AI Champion Ship is now underway, with a month to go before entries close. The organizers describe it as a global competition for builders, dreamers, and tinkerers who want to push AI beyond the o [ ... ]
.NET 10 Final Release Candidate Focuses On MAUI
23/10/2025
The final release candidate of .NET 10, the platform created from a combination of .NET Framework and .NET Core, has been released. Overall, this release focuses on quality and stabilization [ ... ]
- DH2i Launches DxEnterprise For SQL Server 2025
- Europe Gets Its Own LLM
- IBM Launches Granite Version 4.0 and Granite-Docling
- Formae Launched As Terraform Alternative
- Qodana Revisited
- Scouting America Launches AI And Cybersecurity Badges
- Visual Studio Adds Planning Mode To Copilot
- C# Could Overtake Java in TIOBE Index
- XAML.io 0.5 Adds Multi-File Project Editing
- TestSprite 2.0 Sees User Growth
- Codacy Provides Free AI- Risk Assessment
- Epic Settles With Google - Abandons The Rest Of Us
- Apple Extends Bug Bounty Program
{laodposition comment}