4 ms·
I wanted the initial render to be fast, and Go templates really shine there. Since the site has a lot of moving parts, there are many components that get hydrat
by SubGenius 6y ago
I wanted the initial render to be fast, and Go templates really shine there. Since the site has a lot of moving parts, there are many components that get hydrated depending on the page. For instance, this page (https://gurlic.com https://gurlic.com) is generated by Go, but the actions such as like/dislike/share/respond are hydrated by their respective Svelte components. If you scroll all the way down, new posts are fetched and rendered with Svelte components too, and the great bit is that I can use the same action (like/dislike/etc) components there.
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.
- edoceo 6y agoI like this way too
- throwaway894345 6y agoThat's a really neat site. Is it open source (can I peruse the source code)?
- SubGenius 6y agoNot yet, but it's on the roadmap. As soon as I've had time for better integration with Matrix, a bit of refactoring, and writing more tests!