Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rich_harris
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
rich_harris
1mo ago
What a ridiculous comment. This is the first major release of SvelteKit in three years; the last major release of Svelte was two years ago.
2.
▲
by
rich_harris
1mo ago
We definitely do want to move in that direction! For now, we have add-ons for stuff like drizzle and better-auth ( https://svelte.dev/docs/cli/overview ) which makes it relatively easy to set up these things without
3.
▲
by
rich_harris
3mo ago
I have to admit I get very disappointed when I see new form abstractions that don't take this seriously — especially if they make bold claims like 'the new paradigm'!. The whole point of forms is that they're part of HTM
4.
▲
by
rich_harris
3mo ago
The docs don't appear to cover progressive enhancement. Is this an oversight?
5.
▲
by
rich_harris
8mo ago
The Svelte implementation is very inefficient. With a small change I was able to get it to the number two spot on both duration and memory, at least running on this machine. Thyn is in the top spot on both counts — not _hugely_ surprising f
6.
▲
by
rich_harris
8mo ago
No, if you're using `adapter-static` (or, if not using SvelteKit at all, just not doing any dynamic server-rendering) then you are not affected. But upgrade anyway!
7.
▲
by
rich_harris
1y ago
If you think 'helping developers meet their legal obligations to build sites that can be used by everyone' is 'woke', then you should go and use a different framework.
8.
▲
by
rich_harris
1y ago
Three of us are employed by Vercel, and we're probably responsible for over 50% of commits. The core team is much larger than just us though
9.
▲
by
rich_harris
1y ago
ISR _can't_ be implemented at a framework level without tying the framework to the platform. The fact that we instead chose to implement it via a platform-agnostic adapter API surely demonstrates the opposite of what you're implyi
10.
▲
by
rich_harris
1y ago
> I have no doubts they'll do the same with Nuxt, demanding they implement features that solely exist to pad out hosting costs while providing next to no actual benefits to end users and devs has that happened with Svelte? > they
11.
▲
by
rich_harris
1y ago
> $:{} for example is not explicit, I'd much rather use a slightly longer token (like useEffect) to help document what's going on FWIW you're describing a legacy syntax — modern Svelte has explicit effects, and addresses y
12.
▲
by
rich_harris
2y ago
For sure — just wanted to be totally explicit that SvelteKit will always be platform agnostic
13.
▲
by
rich_harris
2y ago
This simply isn't going to happen.
14.
▲
by
rich_harris
3y ago
Ha, did not expect this to be on the front page of HN today! Some quick context: in January I was in London for a few days, and while I was there we had a Svelte Society London event. This document is a text version of a talk I gave there,
15.
▲
by
rich_harris
3y ago
Notice that you just said "You can have a list of components _where each component_ references a bit of global state". In other words, in order to avoid re-rendering everything, you need to have a component for each item in the li
16.
▲
by
rich_harris
3y ago
Michel and I have been internet acquaintances for years, and we've even talked about this stuff IRL. MobX certainly isn't something we just somehow never learned about! But anyway: it's absurd to compare this with React+MobX.
17.
▲
by
rich_harris
3y ago
Hi! First up — not that it matters, but since people will wonder — our design wasn't informed by the Reactivity Transform. We evaluated something close to 50 designs, some of them extremely wacky, before settling on runes, and it wasn&
18.
▲
by
rich_harris
3y ago
FWIW you can of course implement createSignal in four lines of code, if you prefer the ergonomics of that: function createSignal(initial) { let value = $state(initial); return [() => value, (v) => value = $state(v)]; } Note that t
19.
▲
by
rich_harris
3y ago
> Can you build a $derived from multiple other $derived? Yes > Will the end result see temporary, half-updated values? No. It uses a push-pull mechanism — dependency changes don't result in a re-evaluation until something asks fo
20.
▲
by
rich_harris
3y ago
> the more Svelte you write, the more compiled code appears - generally, Svelte compiles to a size somewhat larger than the original source file. This is one of those things that's more of a problem in theory than in practice, but n
21.
▲
by
rich_harris
3y ago
That would be a _terrible_ outcome. Things would routinely break, and code would be vastly more confusing.
22.
▲
by
rich_harris
3y ago
Yes. Signals are a wonderful mechanism, but they do come with headaches. Our goal was very much to adopt the elegant reactivity model without all the downsides, and we've approached this by making them an under-the-hood implementation
23.
▲
by
rich_harris
3y ago
We evaluated somewhere close to 50 different design ideas (seriously) before settling on this one, and what you describe was one of those ideas. But one of our goals was for you to be able to use Svelte's reactivity inside .js/.ts
24.
▲
by
rich_harris
3y ago
We've toyed with this idea. There's a couple of problems though. Firstly, if you have this... type Reactive<T> = T; function $state<T>(value: T): Reactive<T> ...then TypeScript will 'unwrap' the type an
25.
▲
by
rich_harris
3y ago
Having a great experience with TypeScript was very much one of our goals. Many design ideas failed to clear this hurdle
26.
▲
by
rich_harris
3y ago
What I mean by 'implementation detail' is that you _literally can't get a reference to a signal_ in Svelte 5. This alone prevents people from mutating things in unexpected ways.
27.
▲
by
rich_harris
3y ago
We never made any such claim! In fact, the reverse: https://twitter.com/nsthorat/status/1653890181592653825 In Svelte 3, you had to opt in to running code on updates, using things like the `$:` label. It was desig
28.
▲
by
rich_harris
3y ago
Did you read the bit about how runes make all those things unnecessary in future?
29.
▲
by
rich_harris
3y ago
I'll try — I'm currently fielding a zillion messages so excuse brevity! Basically, you can only modify state _where it's declared_. If you want to allow the 'outside world' to modify that state, you need to expose a
30.
▲
by
rich_harris
3y ago
Yep! https://svelte-5-preview.vercel.app/docs/fine-grained-reacti...
More ›