not-found.js

The not-found file is used to render UI when the notFound function is thrown within a route segment.

app/blog/not-found.tsx
export default function NotFound() {
  return (
    <>
      <h2>Not Found</h2>
      <p>Could not find requested resource</p>
    </>
  );
}

Note: not-found.js currently only renders when triggered by the notFound function, we're working on support for catching unmatched routes.

Props

not-found.js components do not accept any props.

Next Steps