From 7891645d4b64bb4ee775d0a5a38fc58abc1dfa90 Mon Sep 17 00:00:00 2001 From: Aman Mittal Date: Tue, 15 Mar 2022 20:04:49 +0530 Subject: [PATCH] Add info on context.ctx argument (#35303) --- docs/advanced-features/custom-app.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/advanced-features/custom-app.md b/docs/advanced-features/custom-app.md index cf8a8fd1fee3..2a7d541cfd72 100644 --- a/docs/advanced-features/custom-app.md +++ b/docs/advanced-features/custom-app.md @@ -40,6 +40,8 @@ The `Component` prop is the active `page`, so whenever you navigate between rout `pageProps` is an object with the initial props that were preloaded for your page by one of our [data fetching methods](/docs/basic-features/data-fetching/overview.md), otherwise it's an empty object. +The `App.getInitialProps` receives a single argument called `context.ctx`. It's an object with the same set of properties as the [`context` object](/docs/api-reference/data-fetching/get-initial-props#context-object) in `getInitialProps`. + ### Caveats - If your app is running and you added a custom `App`, you'll need to restart the development server. Only required if `pages/_app.js` didn't exist before.