Hacker News new | ask | show | jobs
by appsoftware 232 days ago
I've been using Svelte's custom elements (web components) to make components that slot into pages on an existing .net / alpine.js site. It's been a great dev experience and results in really portable components. Each component is it's own bundle (achieved via separate vite configs - you can also organise to bundle groups of components work together). Each of the tools in the tools section is a svelte custom element https://www.appsoftware.com/tools/utilities/calculators
1 comments

Can we build the elements as part of light dom? Do they call their destructor when we navigate away?