Why, with SSR, does the "/" route have to be prerendered (SSG) by default? #944
-
According to the Prerendering routes documentation:
Why is that? I know I could just disable SSR and SSG and use the app as a regular CSR/SPA app, but my goal here is to use SSR on the homepage. Thanks in advance for any clarification 👍 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The Just pass an empty array to the |
Beta Was this translation helpful? Give feedback.
The
/
is prerendered by default because most of the sites built with Analog are more content focused, so the / route is likely a landing page. You don't have to disable SSR to have a dynamically rendered / page.Just pass an empty array to the
routes
array and it will use SSR for initial page requests and switch to CSR/SPA mode for navigation after that so you get the best of both.