File conventions
Not-found file
Supplies fallback UI for the missing segment. Actual HTTP status depends on whether response headers have streamed; check it independently. Source: https://nextjs.org/docs/app/api-reference/file-conventions/not-found. Draft; examples are illustrative snippets, not complete runnable programs.
Formal Syntax & Structure
nextjs syntaxnextjs
app/<segment>/not-found.tsxWorking Example
Example Snippetnextjs
export default function Missing() { return <h1>Book not found</h1>; }