Vercel has announced new Release Candidate for Next.js 15. Let’s look at the new features in Next.js version 15.
What’s new in Next.js 15
A quick summary of new key features in Next.js version 15 :
- React Compiler Support : Now it supports new React 19 and React Compiler
- Caching with Fetch API : Now fetch request and route handlers are no longer cached by default.
- New next/after API : With this experimental API you can execute code after a finished response.
- create-next-app : Now you can enable turbopack in local development.
You can test new features today with this command :
npm install next@rc react@rc react-dom@rc
React 19 support
The Next.js 15 RC is built on the React 19. It means Next.js 15 supports all the new features that coming with React version 19.
React Compiler (Experimental)
The React Compiler is new big React.js feature. The compiler automatically optimize your code and make performance improvements.
With new React compiler you don’t have to use useMemo() or useCallback() hooks to optimize code by yourself.
And Next.js 15 now supports new React Compiler.
How to use new React Compiler in Next.js 15
First, Install babel-plugin-react-compiler
:
npm install babel-plugin-react-compiler
Then, add experimental.reactCompiler
option in next.config.js
:
// next.config.ts
const nextConfig = {
experimental: {
reactCompiler: true,
},
};
module.exports = nextConfig;
Caching mechanism update
By default, next.js 14 app router caches all outgoing fetch requests and GET request to route endpoints.
With Next.js 15, now all caching default behaviour is false. If you not explicitly set cache, next.js will no longer cache any response or request
How to set cache behaviour in next.js ?
You can pass an option object to fetch api to set cache behaviour in next.js
fetch('https://...', { cache: 'force-cache' | 'no-store' });
Now Next.js 15 comes with default no-store cache option selected.
Other new Next.js 15 RC features
There is a lot of new features coming to new version of Next.js,
I suggest you to read this Vercel Blog post to learn details : Next.js 15 Release Candidate | Vercel
Some other new features are :
- Partial Prerendering (Experimental): New Layout and Page config option for incremental adoption
- Bundling external packages (Stable): New config options for App and Pages Router
- Hydration error improvements