1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Update README.md

This commit is contained in:
Guillermo Rauch 2016-10-31 18:13:13 -07:00 committed by GitHub
parent b86f6a2d42
commit 07dbf2a20c

View file

@ -106,7 +106,7 @@ export default () => (
### Component lifecycle
When you need state, lifecycle hooks or **initial data population** you can export a `React.Component`:
When you need state, lifecycle hooks or **initial data population** you can export a `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`.
```jsx
import React from 'react'