Skip to content
Getting StartedChapter 3 / 34Intermediate5 min read

What's New in Next.js 16

Next.js 16 new features: Turbopack default, proxy.ts, Cache Components, async params, React 19.2, naye caching APIs aur breaking changes Roman Urdu mein.

On this page

1. Next.js 16 kya hai?

Is release ka maqsad teen cheezein hain: build aur dev speed, explicit caching, aur tez navigation. Saath mein kuch purani deprecated cheezein hata di gayi hain, is liye upgrade se pehle breaking changes samajhna zaroori hai.

2. Kyun zaroori hai?

Next.js 15 tak caching kaafi had tak implicit thi. Developers ko samajh nahi aata tha ke page static kyun bana ya data purana kyun dikh raha hai. Next.js 16 ne yeh model saaf kar diya.

Next.js 15Next.js 16
Webpack default, Turbopack opt-inTurbopack dev aur build dono mein default
middleware.tsproxy.ts (Node.js runtime)
Implicit cachingCache Components, use cache se opt-in
experimental.ppr flagPPR, cacheComponents ka hissa
Sync params bhi chal jate theparams aur searchParams sirf async
next lint commandESLint ya Biome seedha
revalidateTag(tag)revalidateTag(tag, profile) aur updateTag
Node 18 supportNode 20.9+ zaroori

3. Kahan use hota hai?

FeatureKahan faida
Turbopack2 se 5 guna tez builds, Fast Refresh 10 guna tak tez
Cache ComponentsEk page mein static shell aur dynamic hissay saath
proxy.tsAuth redirects, headers, rewrites
Layout deduplication50 links ka shared layout sirf ek baar download
Incremental prefetchingSirf woh hissa prefetch jo cache mein nahi
updateTagForm save ke baad user ko foran naya data
React 19.2View Transitions, useEffectEvent, Activity

4. Kaise kaam karta hai?

Next.js 16 upgrade ka raasta
Node 20.9+ install
npx @next/codemod@canary upgrade latest
middleware.ts ko proxy.ts rename
params, searchParams, cookies ko await
Parallel slots mein default.js add
next lint ko eslint se replace
next build (Turbopack)

Codemod zyada tar kaam khud kar deta hai. Jo cheez reh jaye, us ke liye official upgrade guide dekhein.

Next.js 16 ke saath React 19.2 aata hai (App Router React Canary use karta hai), is liye useEffectEvent, <ViewTransition> aur <Activity> jaise features available hain. React Compiler support bhi stable hai (reactCompiler: true), lekin default off hai.

5. Code example

Cache Components on karna

ts
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  cacheComponents: true,
};

export default nextConfig;

Naye 16.x minor versions ke docs partialPrefetching: true bhi saath set karne ko kehte hain, apne version ke docs ek baar zaroor dekhein.

middleware.ts se proxy.ts

ts
import { NextResponse, type NextRequest } from "next/server";

export function proxy(request: NextRequest) {
  return NextResponse.redirect(new URL("/home", request.url));
}

export const config = {
  matcher: "/old-home",
};

Async params aur naye caching APIs

tsx
import { cacheLife } from "next/cache";

async function getPost(slug: string) {
  "use cache";
  cacheLife("hours");
  const res = await fetch(`https://api.example.com/posts/${slug}`);
  return res.json();
}

export default async function Page({ params }: PageProps<"/blog/[slug]">) {
  const { slug } = await params;
  const post = await getPost(slug);
  return <h1>{post.title}</h1>;
}

Code kaise kaam kar raha hai?

CheezMatlab
cacheComponents: true"use cache", cacheLife, cacheTag aur PPR on
proxy.tsPurana middleware, ab naam aur function proxy
matcherKin paths par proxy chalega
"use cache"Is function ka result cache hota hai
cacheLife("hours")Cache kitni dair fresh rahe
PageProps<"/blog/[slug]">Global type helper, route se params ka type
await paramsNext.js 16 mein params Promise hai

Doosri breaking changes

ChangeDetail
Webpack chahiyenext dev --webpack, next build --webpack
Parallel routesHar slot ko default.js chahiye, warna build fail
revalidateTagDoosra argument chahiye, jaise revalidateTag("posts", "max")
Naye APIsupdateTag aur refresh, dono sirf Server Actions mein
RemovedAMP, serverRuntimeConfig, publicRuntimeConfig, next lint
next/imageminimumCacheTTL default 4 ghante, qualities default [75]
TypeScriptKam se kam 5.1

Interview tip

"Next.js 16 mein sab se bari tabdeeli?" ka acha jawab: caching ab opt-in hai. Dynamic code default request time par chalta hai aur aap "use cache" se khud batate hain kya cache karna hai.

6. Common mistakes

Galati: middleware.ts ko waise hi chhor dena

Why? Edge use cases ke liye abhi chalta hai lekin deprecated hai aur future version mein hat jayega.

Behtar: File ko proxy.ts rename karein aur exported function ka naam proxy rakhein.

Galati: params ko bina await kiye use karna

Why? Next.js 16 mein sync access hata diya gaya, params ek Promise hai.

Behtar: Server Component mein await params likhein, Client Component mein React use() hook.

Galati: Parallel route slot ka default.js bhool jana

Why? Next.js 16 mein default.js ke baghair build fail hota hai.

Behtar: Har slot mein default.tsx banayein jo null return kare ya notFound() call kare.

Galati: Turbopack ke baad bhi custom webpack config par bharosa

Why? Turbopack webpack config nahi parhta, is liye build mein farq aa sakta hai.

Behtar: Turbopack equivalent config use karein, ya zaroorat ho to --webpack flag lagayein.

7. Pehle aur baad mein kya seekhein?

Final quick revision

PointDetail
ReleaseOctober 2025
BundlerTurbopack default (dev aur build)
CachingcacheComponents: true + "use cache"
MiddlewareAb proxy.ts
ParamsAsync, await params
Node20.9+
React19.2 features