4 ms·
(Elder.js Author) SvelteKit's offering is great. Much better than Sapper. For Vite the HMR on SvelteKit is better than Elder.js but SvelteKit doesn't offer Par
by nickreese 5y ago
(Elder.js Author)
SvelteKit's offering is great. Much better than Sapper. For Vite the HMR on SvelteKit is better than Elder.js but SvelteKit doesn't offer Partial Hydration.
The main difference is Elder.js is designed for static sites and offers tools to help make building large static sites easier.
For instance, when it comes to building non-trivial static sites, there is a lot of data massaging that needs to happen and be in sync across the entire project. A good example is when reading from a headless CMS or generating a sitemap.
With Elder.js, you can massage this data once and add it where you need to via a hook and it will be available on all pages.
SvelteKit is less opinionated. It is apples and oranges.
edit: a word.
- qmmmur 5y agoCan't you do partial hydration by setting certain components to not hydrate inside the <script context="module'>? Thats what it says in the docs but it might not be the same thing in my understanding (which is limited). Also aren't app-wide stores basically the least trivial way of keeping data in sync across an app? Certainly not difficult in SvelteKit as it is - in fact I can't imagine it being any easier.
- kevinak 5y agoNo, SvelteKit does not have support for partial hydration. What you're describing is the no js option in SK. That doesn't allow you to selectively add some JS, it's either all or nothing. You set this option on a per page basis, not per component. The massaging of data that Nick talks about here has to do with data that is needed to build the actual pages, not runtime data (which you could use Stores for).
- arxpoetica 5y agohttps://github.com/sveltejs/kit/issues/1390 https://github.com/sveltejs/kit/issues/1390