Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Fresh-like Islands #5558

Closed
INTERNAL-ERROR opened this issue Jul 15, 2022 · 2 comments
Closed

Add Support for Fresh-like Islands #5558

INTERNAL-ERROR opened this issue Jul 15, 2022 · 2 comments
Milestone

Comments

@INTERNAL-ERROR
Copy link

Describe the problem

Currently Svelte has support for page-wide options for prerendering and hydrating, like so:

<script context="module"> export const prerender = true; </script>

But, as I was listening to a podcast from JSParty about Fresh, I heard them talking about Island architecture. What if we could use these options for prerendering and hydrating specifically for components? This would allow you to create prerendered segments of Svelte components. This allows for greater control over how you render your page, and would allow for you to make a site completely without javascript except for a specific piece of the website/

Describe the proposed solution

Allow you to use

<script context="module"> export const prerender = true; </script>

Plus other page options, such as hydrate.

Alternatives considered

Feel free to suggest alternatives.

Importance

nice to have

Additional Information

Great article explaining Islands here:
Again, not sure if there is a Sveltekit way to do this - just wanted to see if this would work for component.

@dummdidumm
Copy link
Member

Closely related to #1390

@dummdidumm dummdidumm added this to the post-1.0 milestone Jul 15, 2022
@Rich-Harris
Copy link
Member

Going to close this as it's too broad an issue to act upon. We may add some sort of partial hydration mechanism in the future if it feels like the right approach, but it likely wouldn't be islands (which is really only suitable for a narrow subset of web apps, and is far from the optimal approach for partial hydration; it's mainly popular because it's an easy approach to build a framework around).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants