Commit 060480f2 authored by nkzawa's avatar nkzawa

Merge branch 'patch-3' of https://github.com/timoxley/next.js into timoxley-patch-3

parents 27c5632b d8cf0ba7
......@@ -128,6 +128,8 @@ export default class extends React.Component {
Notice that to load data when the page loads, we use `getInitialProps` which is an [`async`](https://zeit.co/blog/async-and-await) static method. It can asynchronously fetch anything that resolves to a JavaScript plain `Object`, which populates `props`.
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 and the `props.url`.
`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