Home IT News Subsequent.js 14 previews partial prerendering

Subsequent.js 14 previews partial prerendering

0
Subsequent.js 14 previews partial prerendering

[ad_1]

Subsequent.js 14, the most recent model of Vercel’s React-based framework for internet growth, previews a compiler enchancment for dynamic content material.

Launched October 26, Subsequent.js 14 provides an experimental preview of partial prerendering, a compiler optimization for dynamic content material that generates a quick preliminary static response. Partial prerendering builds on analysis and growth into server-side rendering, static-site era, and incremental static revalidation. Builders don’t have to study new APIs to make use of partial prerendering.

Subsequent.js 14 additionally provides a secure implementation of Server Actions, for outlining asynchronous server capabilities to be referred to as immediately from parts, without having to manually create API endpoints. Beforehand in an alpha state, Server Actions are built-in into the App Router mannequin. Constructed on internet fundamentals similar to types and the FormData internet API, Server Actions needs to be acquainted to builders who’ve used server-centric frameworks previously, based on Vercel. Mutating information, re-rendering the web page, or redirecting can happen in a single community spherical journey, guaranteeing the proper information is displayed on the consumer even when the upstream supplier is gradual. Additionally, completely different actions might be composed and reused.

Subsequent.js builders have been working to enhance native growth efficiency in each the Pages and App Router since Subsequent.js 13. The Turbopack Rust-based bundler, optimized for JavaScript and TypeScript and Vercel’s successor to Webpack, is predicted to maneuver to “secure” in an upcoming minor launch. Webpack will nonetheless be supported for ecosystem plugins and customized configurations.

Lastly, Subsequent.js 14 introduces some metadata enhancements. Earlier than internet web page content material might be streamed from the server, essential metadata concerning the viewport, colour scheme, and theme first should be despatched to the browser. Making certain these meta tags are despatched with preliminary web page content material helps easy the consumer expertise, stopping web page flickering. In Subsequent.js 14, blocking and non-blocking metadata have been decoupled. Solely a small set of metadata choices are blocking; the intent is to make sure non-blocking metadata won’t forestall {a partially} pre-rendered web page from serving the static shell.

Predecessor Subsequent.js 13 was launched a 12 months in the past, adopted by a number of level releases.

Copyright © 2023 IDG Communications, Inc.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here