Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Next.js) expand_more
Next.js / Data and Rendering

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