Subsequent.js 13, the most recent model of Vercel’s React framework for constructing web applications, provides a pre-release model of a quicker bundler in addition to a redesigned strategy to server rendering, routing, layouts, and knowledge fetching.
Subsequent.js 13 additionally contains a beta of
app/Listing, an enhancement of the framework’s filesystem-based routing system supposed to make it straightforward to put out complicated interfaces and preserve state throughout navigations whereas avoiding costly re-renders. Layouts will be outlined via the file system. As well as,
app/Listing offers a approach to fetch knowledge constructed on high of React Suspense for Information Fetching, and it introduces help for the React Server Element structure.
React Server Parts present a method of defining parts that may have knowledge necessities hooked up to them and by default don’t have any shopper influence. This improves efficiency, notably for cellular purposes, Vercel CEO Guillermo Rauch mentioned.
Subsequent.js customers can replace to model 13 by working the next:
npm i subsequent@newest react@newest react-dom@newest eslint-config-next@newest
Additionally in Subsequent.js 13:
- A brand new font system robotically optimizes fonts, together with customized fonts, and removes exterior community requests, for improved efficiency and privateness. The font system additionally has built-in self-hosting of any font file and a zero format shift that robotically makes use of the CSS size-adjust property.
- A library,
@vercel/og, has been created to work with Subsequent.js to create social playing cards, that are open graph pictures.
- The minimal React model has been bumped from 17.0.2 to 18.20, whereas the minimal Node.js model now could be 14.0.0.
Though Subsequent.js may very well be seen as a competitor to Google’s Angular web framework, Subsequent.js nonetheless has an advocate at Google: Kelsey Hightower, Google distinguished engineer and a technical advisor to Vercel, who participated on this week’s Subsequent.js Conf 22 convention in San Francisco.
“The largest distinction I’ve seen between the 2 is, Subsequent.js truly calls out that tiered computation drawback,” Hightower mentioned. Whereas lots of front-end frameworks are designed for what will be performed on the shopper facet, Subsequent.js offers a CDN (content material supply community) part; computation will be run on the CDN, one layer beneath the browser.
However Hightower was not able to declare Subsequent.js outright superior to Angular. “It’s like saying, is iOS higher than Android? You possibly can attempt to make that comparability.”