Commit 9fe95b5c authored by JJ Kasper's avatar JJ Kasper Committed by Tim Neutkens

Add note explaining empty query during prerendering (#8351)

parent de4e16bf
...@@ -2109,7 +2109,7 @@ This determination is made by the absence of `getInitialProps` in the page. ...@@ -2109,7 +2109,7 @@ This determination is made by the absence of `getInitialProps` in the page.
If `getInitialProps` is present, Next.js will not prerender the page. If `getInitialProps` is present, Next.js will not prerender the page.
Instead, Next.js will use its default behavior and render the page on-demand, per-request (meaning Server-Side Rendering). Instead, Next.js will use its default behavior and render the page on-demand, per-request (meaning Server-Side Rendering).
If `getInitialProps` is absent, Next.js will **statically optimize** your page automatically by prerendering it to static HTML. If `getInitialProps` is absent, Next.js will **statically optimize** your page automatically by prerendering it to static HTML. During prerendering, the router's `query` object will be empty since we do not have `query` information to provide during this phase. Any `query` values will be populated client side after hydration.
This feature allows Next.js to emit hybrid applications that contain **both server-rendered and statically generated pages**. This feature allows Next.js to emit hybrid applications that contain **both server-rendered and statically generated pages**.
This ensures Next.js always emits applications that are **fast by default**. This ensures Next.js always emits applications that are **fast by default**.
......
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