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

Allow on-demand upgrade from static html to js components (islands) #200

Open
ibotty opened this issue Aug 6, 2021 · 3 comments
Open

Allow on-demand upgrade from static html to js components (islands) #200

ibotty opened this issue Aug 6, 2021 · 3 comments
Labels
A-SSR Area: Server Side Rendering (SSR) and Static Site Generation (SSG) C-enhancement Category: new feature or improvement to existing feature

Comments

@ibotty
Copy link

ibotty commented Aug 6, 2021

The idea is described here https://jasonformat.com/islands-architecture/

There was a comment on reddit asking for the same thing.
https://www.reddit.com/r/rust/comments/ouqfg3/new_tokio_blog_post_announcing_axum_web_framework/

@ibotty ibotty added the C-enhancement Category: new feature or improvement to existing feature label Aug 6, 2021
@lukechu10 lukechu10 added the A-SSR Area: Server Side Rendering (SSR) and Static Site Generation (SSG) label Aug 6, 2021
@lukechu10
Copy link
Member

This is currently blocked on #81. Right now, the original DOM is destroyed and recreated.

It would be nice if we could provide support for https://github.com/snowpackjs/astro. That should provide quite a bit of heavy lifting for supporting this.

@mash-graz
Copy link

is this issue still blocked by some fundamental requirements or already solved by #240 or similar improvements?

support for astro would be indeed an extremely useful feature!!

i really would like to use sycamore based web components as islands in this kind of more common markdown based and framework agnostic SSG workflows in my daily work instead of just watching the progress of another competing but again incompatible revolutionary rust web framework. ;)

@lukechu10
Copy link
Member

i really would like to use sycamore based web components as islands in this kind of more common markdown based and framework agnostic SSG workflows in my daily work instead of just watching the progress of another competing but again incompatible revolutionary rust web framework. ;)

If what you mean by web components is this: https://developer.mozilla.org/en-US/docs/Web/Web_Components, sycamore should already be capable of creating web components albeit with some (a lot) of glue code. Eventually we could have a crate like sycamore-element that removes some of the boilerplate for this.

A problem with wasm based frameworks is that they do not support code splitting. Unfortunately, this means either downloading all the components used or creating a separate bundle for each component, at the expanse of duplication of library code. Hopefully this can be solved by rustwasm/team#52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-SSR Area: Server Side Rendering (SSR) and Static Site Generation (SSG) C-enhancement Category: new feature or improvement to existing feature
Projects
None yet
Development

No branches or pull requests

3 participants