Skip to content

Commit

Permalink
Add info on context.ctx argument (#35303)
Browse files Browse the repository at this point in the history
  • Loading branch information
amandeepmittal committed Mar 15, 2022
1 parent 99aea51 commit 7891645
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/advanced-features/custom-app.md
Expand Up @@ -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.
Expand Down

0 comments on commit 7891645

Please sign in to comment.