Rendering

Pages custom App

Shared Pages UI and providers; not the App Router root layout. Source: https://nextjs.org/docs/pages/building-your-application/routing/custom-app

Formal Syntax & Structure

nextjs syntaxnextjs
function App({ Component, pageProps }: AppProps)

Working Example

Example Snippetnextjs
// pages/_app.tsximport type { AppProps } from 'next/app';import Link from 'next/link';export default function App({ Component, pageProps }: AppProps) { return <><header><nav aria-label="Main"><Link href="/catalog">Catalog</Link></nav></header><Component {...pageProps}/></>;}
Next.js Reference