DEV Community

Cover image for What’s New in Next.js 14?
Yash Kapure
Yash Kapure

Posted on

What’s New in Next.js 14?

Hey there! Just caught the Next.js Keynote online and, let me tell you, it’s a game-changer. I’m stoked to give you the quick and dirty rundown of what’s new and why it matters.

No fluff, just the good stuff.

Ready? Let’s jump in!

Next14
Turbopack: A New Engine for Speed
Let’s cut straight to the chase.

Next.js 14 introduces Turbopack, a Rust-based engine that boosts your local development like never before.

next dev --turbo
Enter fullscreen mode Exit fullscreen mode

It’s not just hype; the data proves it. You can look forward to a 53% faster local server startup and a 94% speedier code update with Fast Refresh.

Imagine getting all these performance benefits without changing a single line of code in your existing Next.js project!

Server Actions: Streamlining Data Mutations
Ever thought of triggering server-side code without the need for a dedicated API route?

Next.js 14 brings Server Actions into a stable release.

It’s a game-changer for the developer experience. Now, with just a function defined in your React component, you can perform actions on the server securely.

Here’s a simplified example:

export default function Page() {
  async function create(formData: FormData) {
    'use server';
    const id = await createItem(formData);
  }

  return (
    <form action={create}>
      <input type="text" name="name" />
      <button type="submit">Submit</button>
    </form>
  );
}
Enter fullscreen mode Exit fullscreen mode

This not only simplifies your code but also enhances the user experience by reducing the number of network roundtrips needed for mutating data and re-rendering the page.

Partial Prerendering: The Best of Both Worlds
Partial Prerendering is in preview, but it’s already exciting.

With the ongoing debate between SSR and SSG, Next.js has decided to bring you the benefits of both worlds.

It provides a fast initial static response while streaming dynamic content based on your React Suspense boundaries. So, you get the performance of static sites and the dynamism of server-rendered apps.

Again, no new APIs to learn

Metadata and Other Under-the-Hood Changes
Metadata options like viewport, colorScheme, and themeColor have been revamped to improve the initial rendering experience and reduce layout shifts.

Also, Next.js 14 has new deprecations and breaking changes to watch out for, such as the minimum Node.js version being raised to 18.17 and some API modifications.

Next.js Learn: Your Free Learning Hub
Last but not least, Next.js 14 comes with a refreshed and updated free course on Next.js Learn. From basics to advanced features like Partial Prerendering, it’s a complete resource to level up your Next.js skills.

Next.js by Vercel - The React Framework
Production grade React applications that scale. The world's leading companies use Next.js by Vercel to build static and…
nextjs.org

Wrapping It Up
And there you have it — the news from the Next.js front!

I hope this quick read has been insightful for you. Feel free to dive into the comments to discuss these fresh updates.

For a more in-depth look at each point, make sure to check out the Next.js team’s official blog post: Next.js 14 Details.

Top comments (1)

Collapse
 
yashkapure06 profile image
Yash Kapure

Could you guys please add more features?