I love svelte. but now resorting to server rendered html pages with sprinkles of JS. shit I work on and I have noticed in the world doesn't really need frameworks like react, svelte, vue etc.
Svelte can do server-rendered and static page generation with the near-zero overhead of string concatenation, and with it you gain the component model. Part of the magic of compilers is that you can get most of the best of both worlds. Sapper provides both of these use cases.
Why Svelte is our choice for a large web project
91–100 of 136 posts
Re: Why Svelte is our choice for a large web project
#92does svelte have a way of hiding the .svelte components from the users on the frontend? e.g. so they cant blatantly rip the source code in your components and reuse them
Sure, it's easy: don't serve sourcemaps. This isn't specific to Svelte though. In fact your code is much more obfuscated with Svelte than with most comparable tools, since you're not serving the code you actually wrote, but rather the output of a compiler (while this is technically true if you're using TypeScript/a minifier/whatever, it's qualitatively different).
Not having a run time on the client is huge. But, the developer experience is exactly the same as you get from React and Vue.
You can trust this guy here, he knows what he is talking about.
Re: Why Svelte is our choice for a large web project
#93I LOVE what svelte is doing. I've been using React daily for the last 5 years & it does the job, documentation is world class, community is great, but it still has sharp edges & parts that feel bad. Things like hooks make complicated things look & feel simple, which is great for 80% of my work, but for that other 20% (exit animations, high frequency re-renders, drag-n-drop without HTML5) I do some pretty atrocious th…
Re: Why Svelte is our choice for a large web project
#94I'm concerned I'll spend all of my time restarting my application to validate changes. Is this a non-issue?
Re: Why Svelte is our choice for a large web project
#95I dislike the templating pseudo language of Svelte (and many view frameworks). Maybe I am spoiled by react but I never ever want to write my view logic in anything else than JS. This is my main blocker for Svelte.
I've never fully understood this viewpoint, which comes up a lot in relation to React and JSX specifically. The templating in Svelte and Vue is (almost) html with some magic sprinkled here and there, so much closer to the end result. Using JS for everything is moving further away from the metal. What is it about writing views the React way that appeals to you more?
You can't ship until it looks good, and the longer features are in-flight the worse management feels about the team's abilities.
Re: Why Svelte is our choice for a large web project
#96For me, the biggest downside to Svelte is the lack of TypeScript support. This is a massive deal-breaker for myself as well as many other developers. I am also not a fan of the Moustache/Handlebars inspired templating, it feels outdated in the face of enhancing standard HTML or going in the direction of something more extreme like JSX. I think Svelte is refreshing, but I would not be comfortable using it on a large-s…
Re: Why Svelte is our choice for a large web project
#97Earlier quoted context omitted.
Frameworks like React aren't the real headache today, for me at least. It's all the machinery of web development. Webpack, babel, polyfills, various CSS transforms and ways to utilize CSS (sass, less, CSS modules, CSS inline, the list is a mile long). My organization has tossed so many manhours into maintaining webpack and our build that you could recreate our entire site numerous times over in a bog standard LAMP st…
At the risk of sounding naive: what's the alternative?
Re: Why Svelte is our choice for a large web project
#98For me, the biggest downside to Svelte is the lack of TypeScript support. This is a massive deal-breaker for myself as well as many other developers. I am also not a fan of the Moustache/Handlebars inspired templating, it feels outdated in the face of enhancing standard HTML or going in the direction of something more extreme like JSX. I think Svelte is refreshing, but I would not be comfortable using it on a large-s…
The template language's restrictions compared to JavaScript/JSX-built views are part of Svelte's performance story. It's able to optimize things ahead of time that are impossible with dynamic code because of the constraints. Here's a couple tweets from the author about that -
1 - https://twitter.com/Rich_Harris/status/1224414679021301761
2 - https://twitter.com/Rich_Harris/status/948231770725605377
The Svelte template language is quite small, and compositional features like slots and are powerful. There are currently some unwanted edge-case restrictions as this comment points out - https://news.ycombinator.com/item?id=22541100
Re: Why Svelte is our choice for a large web project
#99For me, the biggest downside to Svelte is the lack of TypeScript support. This is a massive deal-breaker for myself as well as many other developers. I am also not a fan of the Moustache/Handlebars inspired templating, it feels outdated in the face of enhancing standard HTML or going in the direction of something more extreme like JSX. I think Svelte is refreshing, but I would not be comfortable using it on a large-s…
I submit that any large Ember codebase is intractable without Typescript.
Re: Why Svelte is our choice for a large web project
#100Earlier quoted context omitted.
Someone on HN recommended it to me before, so I’ll just pass this along: look at intercooler JS for making individual “live widgets” on a well-designed graceful degradation site like you describe.
Haven't heard of that one. Thanks!