...

/

Server Side Rendered Page with Data

Server Side Rendered Page with Data

When a page needs the most current data, it cannot be statically generated. You can still have our HTML created on the server and sent to the client, which is what we call a server-side rendered page.

When should you server-side render a page?

A good way to judge if server-side rendering a page is the right page type for you is to ask yourself a few questions.

  • Will the data change often?
  • Is the most recent data important?
  • Will the page use route parameters in order to determine which data it will retrieve?

If you answered yes to any of those questions, you will need to server-side render the page.

When HTML gets generated

Lastly, if you remember from a previous lesson, statically generated pages are created at build time. That means that when someone requests that page, the server has the HTML in hand and serves it to the user right ...