Commit 2c85b367 authored by Tim Neutkens's avatar Tim Neutkens Committed by Arunoda Susiripala

Add notice about getInitialProps (#1140)

* Add notice about getInitialProps

* Remove extra whitespace
parent acc1983f
......@@ -214,6 +214,8 @@ Notice that to load data when the page loads, we use `getInitialProps` which is
For the initial page load, `getInitialProps` will execute on the server only. `getInitialProps` will only be executed on the client when navigating to a different route via the `Link` component or using the routing APIs.
_Note: `getInitialProps` can **not** be used in children components. Only in `pages`._
`getInitialProps` receives a context object with the following properties:
- `pathname` - path section of URL
......
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