Yeah that's one of the things I love about Svelte. It tends to enhance fundamental web knowledge rather than forcing you to think in convoluted ways.
Features like actions put you close to the bare metal so to speak. I use those all the time.
It's an incredibly refreshing experience compared to other frameworks that create custom concepts for everything they do.
The builder.io team made a tool called Mitosis[^0] that lets you input a component written in almost any framework and automatically recreate that same component in any other framework including Vue, React, Qwik, Angular, Svelte, React Native, Lit, web components, and even Swift
It's always interesting to try out different frameworks and compare the plain HTML version of certain components with this tool
FWIW, I think that "it's much closer to being just javascript™" statement has absolutely held up over time (Angular, esp. the old angular.js is painful compared to React for this reason), AND that Svelte is likely a step closer again (which they can do because they have an entire compiler and aren't reliant on embedded a DSL inside of JavaScript).
If I `export let` a variable to be reactive over here, why isn't it reactive over there?
You can even create variables reactive to one another by declaring a variable like so:
$: y = x * 2
Using the export let x = default; option is for passing data from the parent component/page to a child. If you want variable changes in the child to be reflected in the parent, you can use a store ($ notation), or you can use bind like so:
<ChildComponent bind:x={someValue}>
In my opinion, all of this is much much easier than in competing frameworks.
On my page, I had a script tag pulling from the store. The variable was reactive within the script tag.
I export let that into the template via “data” props.
I changed the value of the variable within the script tag.
The template did not reflect the new value.
Also, maybe look into store subscriptions and/or reactive declarations for what you're trying to do.
Regardless, it sounds like you really need to just read the docs or do a tutorial.
The frontend is open source and available here if someone is interested what a complex SSR heavy SvelteKit application deployment looks like:
http://github.com/tradingstrategy-ai/frontend
The SSR server is a lightweight Node.js web server (Vite), but you can have it nicely along your backend API web server (Pyramid in our case). Both are reverse proxied behind the same domain using Caddy.
Very little surface area. It embraces your knowledge of plain ole CSS/JS/HTML and empowers you with reactivity and a means of if being able to add motion to your ui.
Newbs and Pros alike can build fast with it. That speed + reactivity allows your software to better keep up with your converstaions that make it all so. Thats insanely powerful.
It's soooo good. Congratulations to Richard Harris and everyone on the Svelte/SvelteKit Team! <3