4 ms·
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 migra
by muyuu 4y ago
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?
- rk06 4y agoSvelte is compiled, but not compiled to html. It is compiled to js. It works like any other client side js framework like react/vue
- ttfkam 4y agoDepends 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 https://kit.svelte.dev/docs/page-options#prerender Compilers are awesome.
- can_center_divs 4y agoThis assumes you are using SvelteKit, not vanilla Svelte
- ttfkam 4y agonpm 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;
- can_center_divs 4y agoThe 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.