Software Development

Stop Using Next.js 14

Use Next.js 15 Instead.

Stop Using Next.js 14
AI Generated Image

Next.js continues to reign as one of the greatest full-stack frameworks out there.

However, it may be time for us to stop using Next.js Version 14...

This is because the Next.js 15 Release Candidate (RC) version has been released!

Next.js 15 RC promises lots of exciting new features, 4 of which we will explore today!

So without further ado… Let’s dive right in!

1. Partial Pre-Rendering

Partial Pre-Rendering (PPR) is a special feature introduced in Next.js 14 that allows static and dynamic page content to coexist flawlessly.

If you want to learn more about how PPR works under the hood, feel free to check out this article.


But in Next.js 15, incremental adoption of PPR is finally available!

This means you can opt specific page.tsx and layout.tsx files into PPR by setting the experimental_ppr flag equal to true:

Then set the experimental.ppr config in your next.config.js file to 'incremental':

2. next/after

next/after is a brand new API that allows you schedule work after a response has finished streaming.

In other words, once a serverless function has finished computing, you now are able to run additional code inside a new after() function.

How next/after works
How next/after works

This is very useful for post-fetch logging and analytics.


If you want to use next/after now, you can add the experimental.after setting in your next.config.js file as follows:

Here is an example using the after() function inside a Next.js server action:

3. Caching

The Next.js team have listened to us!

  • fetch requests
  • GET handlers
  • and client navigation...

are no longer cached by default!

This is a long-awaited change, and I am glad Next.js 15 finally implements this.

NOTE: If you wish to revert back to old caching behavior for fetch, GET, and the router cache, the Next.js 15 RC announcement article makes this clear.

4. React 19 Support

Officially, Next.js 15 RC is fully compatible with React 19 RC!

In case you haven't heard of the React 19 release, here is the official tweet from React.

Additionally, you can watch the React Conference Keynote here to find out more.

Conclusion

I hope this article has convinced you to move away from the era of Next.js 14, and get you hyped for Next.js 15.

Next.js 15 brings about countless exciting changes, and we have covered 4 of them extensively today.


If you enjoyed this article, please make sure to Subscribe, Clap, Comment and Connect with me today! 🌐

References