-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
I was wondering how one could render a Dom-tree to an HTML string for server-side-rendering (SSR).
Conceptually I see three options:
- Render the application in a headless browser with
wasm-bindgen-test. This should be quite easy to set up, but is slow and brittle. (example code) - Adding an intermediary runtime layer in rust-dominator, which wraps dom nodes and operations on dom nodes. So
Domwould not store aweb_sys::Nodebut some internal struct, which could either contain a web_sys-node or some internal node representation. - Allow to swap out
web_sysat compile-time with a virtual dom library that has a compatible API toweb_sys, and provides all the functionality needed by rust-dominator.
What do you think about this topic in general? Are there other ways?
cortopy, d4h0, MendyBerger, schneiderfelipe, kellytk and 2 more
Metadata
Metadata
Assignees
Labels
No labels