2 ms·
Svelte gives us a host of possibilities because of it being compile time. Its the perfect UI language. Think about it. You can write anything in the script par
by himujjal 6y ago
Svelte gives us a host of possibilities because of it being compile time. Its the perfect UI language.
Think about it. You can write anything in the script part. Lets say you have a Go UI framework. Write Go code inside script tag and use the template to produce UI elements for TUI apps, for desktop apps without even working hard to manage state, manage UI element paradigms. The simple reactive style of programming can be used. Of course a different compiler can be used. But the possibilities are open. With React and stuff that's kind of difficult. You will eventually end up writing original Go code.
And currently you can compile Svelte components into React/Preact etc. Its not production quality. But its possible. (Svelte2TSX makes it possible)