Simple Server Island Example #11805
Replies: 3 comments 4 replies
-
1. Create a server component
2. Use it with
|
Needs | Notes |
---|---|
Adapter with on-demand SSR (@astrojs/node, Netlify, Vercel, etc.) | server:defer works in Astro 4.12+ |
Normal Astro build/deploy commands | Islands respect cache headers—add Cache-Control if you want CDN caching |
Thanks 🙏
Beta Was this translation helpful? Give feedback.
-
I was able to test this example and it works nicely, @jp-knj , thank you! I'm thinking maybe after "How it works" on the Server Islands page, we could have this as a small "Build your first server island" example. (Before "Caching" and other more technical details.) What would you think about adding this there? Another alternative (perhaps additionally?) would be to create an actual recipe on its own page with a slightly more involved example, perhaps with a fetch call to an API (e.g. displaying the current weather?) |
Beta Was this translation helpful? Give feedback.
-
Hi! Here are two small Server Island examples that I could come up with:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
During Talking & Docing on 5/29 it was mentioned by Sarah that the Server Islands page could use a good actual example usage and asked for ideas
I don't have any.
But I'm making this discussion to get input from everyone else 👍
Beta Was this translation helpful? Give feedback.
All reactions