Skip to content

Commit

Permalink
Update GIP docs (#11303)
Browse files Browse the repository at this point in the history
* Updated docs

* bump

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
  • Loading branch information
3 people committed Mar 23, 2020
1 parent 1307331 commit 1690a75
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions docs/api-reference/data-fetching/getInitialProps.md
Expand Up @@ -4,15 +4,12 @@ description: Enable Server-Side Rendering in a page and do initial data populati

# getInitialProps

## Recommended: `getStaticProps` or `getServerSideProps`

If you're using Next.js 9.3 or newer, we recommend that you use `getStaticProps` or `getServerSideProps` instead of `getInitialProps`.

These new data fetching methods allow you to have a granular choice between static generation and server-side rendering.

Learn more on the [Pages documentation](/docs/basic-features/pages.md) and the [Data fetching documentation](/docs/basic-features/data-fetching.md):

## `getInitialProps` (for older versions of Next.js)
> **Recommended: [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation) or [`getServerSideProps`](/docs/basic-features/data-fetching.md#getserversideprops-server-side-rendering)**
>
> If you're using Next.js 9.3 or newer, we recommend that you use `getStaticProps` or `getServerSideProps` instead of `getInitialProps`.
>
> These new data fetching methods allow you to have a granular choice between static generation and server-side rendering.
> Learn more on the documentation for [Pages](/docs/basic-features/pages.md) and [Data fetching](/docs/basic-features/data-fetching.md):
<details>
<summary><b>Examples</b></summary>
Expand Down

0 comments on commit 1690a75

Please sign in to comment.