7 Key Updates in Next.js15
As much as we love to hate this stack, we can’t deny its impact on the way we build modern web applications. After all, Next is the godfather of all meta frameworks. The latest release of Next.js is packed with features that will make even the most skeptical developers take notice.
Let’s start with one of the biggest updates.
1. Next.JS & React 19
Next.JS is now aligned with the upcoming release of React 19 so whether you’re using the App Router or Pages Router, you’ll be able to upgrade seamlessly, with tools like automated codemods easing the transition.
# Use the new automated upgrade CI
npx @next/codemod@canary upgrade latest
# ...or upgrade manually
npm install next@latest react@rc react-dom@rc
If you are not familiar with it, React 19 comes packed with a host of improvements, including a new React Compiler. This experimental feature deeply understands your JavaScript and React code, automatically applying optimizations so you don’t have to manually memoize everything.
2. Caching
Next is known for its speed and the magic it performs under the hood to reach these impressive results. Much of this performance boost relies on efficient caching. Starting with version 15, Next has changed how caching works for GET route handlers and client-side navigation. Routes are now uncached by default, giving you more control over when and how you cache content.
Of course, if you prefer the old behavior, you can still opt into caching on a per-route basis. This change gives developers more flexibility while making sure that your app stays fast without having to juggle unnecessary caching overhead.
3. Turbopack
Speaking of performance, Next.js 15 officially brings Turbopack Dev to the stable release. Turbopack has been in the works for a while, promising lightning-fast development builds. Now, with this stable version, you’re looking at up to 96% faster code updates and significantly reduced local server startup times.
4. Self Hosting
One long-term initiative from Next.js, aimed at addressing some of its critics, is the improvement of self-hosting. In version 15, developers gain more control over how their applications are served, particularly with improvements around Cache-Control headers. This means you can fine-tune your caching strategies for better compatibility with CDNs, ensuring your app’s performance is as optimized as possible when running on your own infrastructure.
This is also a good time to mention the Open Next initiative which tries to properly document all the efforts needed to self host Next.
5. Security
On the security front, Next 15 generates unguessable, non-deterministic IDs for server actions, ensuring that only the intended actions are publicly accessible.
'use server';
// This action **is** used in our app
// So Next.js will create a secure ID
// To allow client to reference and call Server Action
export async function updateUserAction(formData) {}
// This action **is not** used in our app
// So Next.js will remove this code at next build
export async function deleteUserAction(formData) {}
This adds an extra layer of security by reducing the chances of exposing unused or sensitive actions to the client.
6. TypeScript Support
Another small update which will improve your quality of life is that Next JS now supports the TypeScript next configuration file type and provides a Next Config type for autocomplete and type-safe options.
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
/* config options here */
};
export default nextConfig;
7. Form Component
Finally, the new Form component appears to be a game changer for anyone dealing with forms in their apps. It extends the native HTML form, bringing in client-side navigation, prefetching, and progressive enhancement out of the box. So Next JS will handle all the client-side form navigation for you.
import Form from 'next/form';
export default function Page() {
return (
<Form action="/search">
<input name="query" />
<button type="submit">Submit</button>
</Form>
);
}
If you feel like you learned something, you should watch some of my youtube videos or subscribe to the newsletter.
Until next time, thank you for reading!