Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wording of new data fetching methods recommendation #11221

Merged
merged 1 commit into from Mar 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/api-reference/data-fetching/getInitialProps.md
Expand Up @@ -4,9 +4,11 @@ description: Enable Server-Side Rendering in a page and do initial data populati

# getInitialProps

## Recommended: Use `getStaticProps` or `getServerSideProps` instead
## Recommended: `getStaticProps` or `getServerSideProps`

If you're using Next.js 9.3 or newer, you should use `getStaticProps` or `getServerSideProps` instead of `getInitialProps`.
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):

Expand Down