menu_book Course Curriculum (Next.js) expand_more
App Router Foundations
Data and Rendering
Server Features
notFound and not-found.tsx
Learn notFound and not-found.tsx in Next.js through a focused explanation, a topic-specific example, an engineering warning, and a mastery check.
12 min read
•
Intermediate
nextjs-016.ts
typescript
import { notFound } from 'next/navigation';
export default async function Page(){ const record=null; if(!record) notFound(); return null; }
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content