Replies: 3 comments 2 replies
-
This is very interesting idea! I particularly like how it aligns with the island architecture that Astro users are already familiar with. Question: What about the page component? I guess it can't be an island by itself, and you need something in case of redirects or 404s. So I'm curious if in this model the page component would have some other way to signal that it needs to 404. |
Beta Was this translation helpful? Give feedback.
-
Cross-linking this Twitter thread so it's not lost on X: https://twitter.com/matthewcp/status/1714677585857114283 |
Beta Was this translation helpful? Give feedback.
-
This proposal has been accepted as is now stage 2: #945 Please continue the discussion there. |
Beta Was this translation helpful? Give feedback.
-
With the ssr experimental flag released, I propose an idea I have had bouncing around in my head.
Propsal
It may not always be necessary to render all components, especially if you have to await API network requests or use heavy libraries server-side.
Doing so on each request would waste billable server time with serverless, slow down the page loads for the user and SEO crawlers, as well as exceed API quotas if the developer is not prepared for a sudden influx.
My idea is a
server:
directive that behaves similarly to theclient:
one already in use.By default, all components are rendered statically on server build, but they can be toggled to be SSR by using
server:dynamic
.Example
Syntax
In my proposal
server:
will have only one mode, that beingserver:dynamic
.Open questions
Would it be useful to have other server-side modes too, for example
server:cache={time ms}
?Beta Was this translation helpful? Give feedback.
All reactions