Global layout
Render every Pages Router page through a custom application shell.
Next.js 16+ · Type Alias
AppProps types the props received by a custom Pages Router App. It supplies the active page component and its page props so the App can render shared layouts or initialization logic.
AppProps is the TypeScript shape used by a custom App component in the Pages Router. It provides the active page component through Component and that page's data through pageProps, which the custom App can render or use for shared initialization and layout behavior.
type AppProps = { Component: NextPage; pageProps: object }| Name | Type | Description |
|---|---|---|
Component | NextPage | The currently active page component rendered by the custom App. |
pageProps | object | Props supplied to the active page component. |
A React element containing the active page component and its pageProps.
import type { AppProps } from 'next/app'
export default function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />
}Types a custom Pages Router App that renders the active page with its supplied props.
Render every Pages Router page through a custom application shell.
Apply initialization behavior shared by all Pages Router pages.
Pass shared or computed values to the active page.
Custom AppNextPagegetInitialPropsgetStaticPropsgetServerSideProps