News for hackers. Stuff that matters.
Re:My Evaluation of SvelteKit for Full-Stack Web App Develop... by tarjei_huse on Wednesday January 05, 2022 @08:35AM (#29808673)
I love Svelte and find it refreshing.

The only thing I react to is the part about "It feels much like Rust vs. C++. Rather than adding layers upon layers to existing infinitely backwards-compatible software, it takes the best patterns and features and builds them from the ground up.".

Svelte bungled this in one place and that is in the html coding. For example Svelte has different syntax for if ({#if}, else ({:else}) and endif ({/if}. I end up looking this up in the documentation way too often - especially when not doing Svelte fulltime.

Re:My Evaluation of SvelteKit for Full-Stack Web App Develop... by licyeus on Wednesday January 05, 2022 @10:12AM (#29809904)
I initially preferred JSX ("it's just Javascript"), esp. with Svelte oddities like `$$props`, but after working with Svelte templating for a while I now prefer it due to things like property shorthand and event forwarding.

Re: `:else` syntax, I also made mistakes (`#` and `/` were familiar having worked with Handlebars/Mustache) until I internalized that `:` meant block continuation (also used with await/then/catch).

Re:My Evaluation of SvelteKit for Full-Stack Web App Develop... by tumblen on Wednesday January 05, 2022 @09:47AM (#29809587)
I use Svelte full-time and absolutely love it, but I do have to admit I sometimes wonder what lead to the decision of {#if}{:else}{/if}, {#each}{/each}, etc syntax. Seems like there had to be less verbose, more consistent approach... But, I'm probably not fully-aware of the constraints and missing something.

I sometimes miss the brevity of the React way (which can also be good and bad) for handling conditional code-blocks {visible && <Component>} or {visible ? <Component1 /> : <Component2 />}

Re:My Evaluation of SvelteKit for Full-Stack Web App Develop... by pier25 on Wednesday January 05, 2022 @12:18PM (#29811817)
Why not use a snippet that will write it for you?