提交 2c85b367 编写于 作者: T Tim Neutkens 提交者: Arunoda Susiripala

Add notice about getInitialProps (#1140)

* Add notice about getInitialProps

* Remove extra whitespace
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册