- Published on
Next.js conf24 : What's new in Next.js 15 ?
- Authors
- Name
- Mohamed Aziz Karoui
- @maiko26_
What's new ?
On 24th Octobre we had Next.js conf24 an amazing event where the Vercel team shared the newest and latest updates about Next.js and its future trajectory.
In the conference there were some big updates followed by other small remarkable features, and the Keynotes started by unveiling 4 main goals they had for Next.js 15:
-
Make it Work
-
Make it Right
-
Make it Fast
-
Ship it
Make it Work :
So much complexity comes bundled in Next.js and React ecosystem as a whole and Server components came to simplify all of that Dynamic APIs (headers, cookies, searchParams...) and Route config options (revalidate, fetchCache...) and all the data fetching complexity.
So Next.js 15 focused on simplifying data fetching and make it work like you expect with no magic or over caching.
Make it Right :
To make it right, you have to iterate over and over again to go from an idea to ship.
And this is where Turbopack came into prominence not just for speed but also for reliability and DX friendliness.
In the past Next.js had implicit errors but now it does an accurate diff and it tells you where you made an error especially for Hydration errors where I'm sure a lot of people have faced before.
And now the Vercel team has officially announced that Turbopack is stable for dev server with parity with exiting compiler while expanding ecosystem compatibility and optimized cold compilation.
With the new Turbopack compiler it's 50% faster for initial compilation and up to 90% faster for code updates with fast refresh which's an insane improvement compared to the old compiler and they even tested it live on the Next.js website itself where it showed remarkable difference in speed.
Turbopack is now finally Developement Stable but it's still not Build Stable as you can still check the progress on AreWeTurboYet? where it's 96% tests passing but those last 4% are the hardest to achieve so it will be a while before we hear another update about it.
Make it Fast:
Turbopack was already a marvelous reveal for making it fast but this section was also really good as it was all about caching.
"use cache" it's the latest and newest directive introduced by Next.js where it's by default it uses in process memory cache where it starts at memory but you can later configure it to any architecture you want.
Similar to "use server" and "use client", caching is now an opt-in experience unlike previously with Next.js.
unstable_cache is now pretty much deprecated as "use cache" is considered it's successor.
Also for revalidation cacheTag and cacheLife are APIs introduced to give you more control on caching while getting rid of other deprecated methods like fetch("", { cache: "no-store"})
, "force-dynamic"
, "force-cache"
, export const revalidate
etc... which weren't as intuitive to use.
Ship it Self-Hosting has been a huge issue for Next.js as it seemed hosting Next outside of Vercel felt impossible and it even sparked an entire Open Source Community dedicated to making Next.js truly Open Source and hostable anywhere called OpenNext and here the Vercel team renewed their commitement to making Next.js truly easy to host anywhere not just on Vercel.
First they started by explaining that the docs lacked depth as it didn't explain all the key features of Next.js behind the scenes like Rendering, Caching/ISR and Image optimization that Vercel did for you behind the scenes and their first commitment is for Self-Hosting Education and to improve the docs overall.
Second, as mentioned in the previous section they made caching more customizable and easier to do so when deploying in Docker Containers you know how to adjust everything according to your needs.
Third, Sharp Installation is now Automatic bundled with Next.js instead of their native WebAssembly for Image optimization because the latter used too much memory which would be a problem on a VPS.
And finally Node.js middleware is now supported by Next.js and Vercel has partnered with many known self-hosting services to create adapters and docs under a new Github organization Next.js.