Unverified Commit 7891645d authored by Aman Mittal's avatar Aman Mittal Committed by GitHub

Add info on context.ctx argument (#35303)

parent 99aea513
...@@ -40,6 +40,8 @@ The `Component` prop is the active `page`, so whenever you navigate between rout ...@@ -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. `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 ### 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. - 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment