From 6c47dfe4dfc24244bfbaeace333e0b33273d185c Mon Sep 17 00:00:00 2001 From: Aman Mittal Date: Mon, 14 Mar 2022 17:37:09 +0530 Subject: [PATCH] Add info on context.ctx argument --- 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 cf8a8fd1fee..2a7d541cfd7 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.