Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> best dx pre-v5

Did something bad happen to dx in svelte in v5?



They are moving to "Runes"[0] which IMHO feel clunky compared to previous reactive declarations. There's some perf reasons, but Svelte performance was not an issue for me to begin with.

[0] https://svelte.dev/blog/runes


Bad is subjective too.

There's new syntax for props, reactivity and state that's slightly more complicated for hello world applications but you really notice the differences for even mildly complicated components.

export let foo;

vs

const {foo} = $props()

looks far worse until your doing something like extending an input and you no longer have to deal with $$RestProps ugliness

type Props = {foo: number} & HTMLInputAttributes

const {foo, ...rest} : Props = $props()

<input {...rest} />


v5 is not even released yet, so I would ignore that statement.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: