mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Add notice about getInitialProps (#1140)
* Add notice about getInitialProps * Remove extra whitespace
This commit is contained in:
parent
acc1983f80
commit
2c85b367ce
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue