News for hackers. Stuff that matters.
Re:Thoughts on Svelte by muyuu on Monday March 27, 2023 @10:21AM (#35327007)
given that Svelte aims to be mainly pre-processed, how hard is it to combine it with more real-time solutions like Vue for instance? (you mention that you migrated from Vue2)

is it possible to use Svelte more for client-only or client-mainly views, and use other solutions for stuff that communicates more with the back-end? or do they get into each other's way?

Re:Thoughts on Svelte by rk06 on Monday March 27, 2023 @01:38PM (#35329727)
Svelte is compiled, but not compiled to html. It is compiled to js. It works like any other client side js framework like react/vue
Re:Thoughts on Svelte by ttfkam on Tuesday March 28, 2023 @03:20PM (#35346408)
Depends on whether or not the following is set:

    export const prerender = true;
If it is, it IS in fact compiled to HTML. :-) https://kit.svelte.dev/docs/page-options#prerender

Compilers are awesome.

Re:Thoughts on Svelte by can_center_divs on Wednesday March 29, 2023 @01:29AM (#35353023)
This assumes you are using SvelteKit, not vanilla Svelte
Re:Thoughts on Svelte by ttfkam on Wednesday March 29, 2023 @10:28AM (#35357791)

    npm create svelte my-app
Creates a SvelteKit app now, not plain Svelte. That said, you can easily disable the server-side portion.

    export const ssr = false;
Re:Thoughts on Svelte by can_center_divs on Wednesday March 29, 2023 @01:31AM (#35353035)
The important difference to note compared to React, is that Svelte doesn't virtualize the DOM. It works in the same way vanilla JS works when it comes to DOM manipulation.

Even though it is compiled, you are still working closer to the browser. You can still use all vanilla JS DOM manipulation methods in your code and it will work as expected. Which is an enormous advantage over React, at least for me.