by SubGenius · 6y ago · 0 comments
The initial pages are Go templates which are hydrated with Svelte components. It took a bit of trial and error to get the flow right so that I don't have to write double the code.
I don't know if it's the next big thing or not but it works really well for me.
What is the advantage of doing this over using http.FileServer to serve html which imports your svelte generated javascript directly ?
Are you using Svelte in a part of your application instead of the entire application?
Maybe there's a better way to do it, but I like writing smaller components that can replace initial server-rendered HTML, and can then be imported into larger components.