4 ms·
(unrelated to the main topic) > The other day I wanted to learn Svelte... Any highlight(s) regarding positive/negative experiences that you had with Svelte so
by zepearl 5y ago
(unrelated to the main topic)
> The other day I wanted to learn Svelte...
Any highlight(s) regarding positive/negative experiences that you had with Svelte so far?
Asking because it's on my to-do list for my future frontend (bought 2 books about it, but pending to be read as I'm currently first trying to assimilate "Rust" to program the backends) and I ended up selecting Svelte as potential best candidate after having read the docs & having played with its tutorials => I therefore got a general "positive initial feeling" about it.
The last time I wrote a web-UI was many years ago with PHP & Codeigniter & some hand-written Javascript (from my POV that was alright, lightweight/simple/flexible/low-effort and performance was ok, I would/could do that again but maybe Svelte might be better for what I'd like to do now), so I'm not really up-to-date in this area - Svelte just sounds lightweight & flexible enough for me... . Cheers :)
- com2kid 5y ago> Any highlight(s) regarding positive/negative experiences that you had with Svelte so far? Sveltekit was a bit of a pain to get running, but using svelte itself has been insanely nice. I got an entire internal website up and running with a bunch of cool functionality in ~3 days. The state management with Redux alone would have taken that long if I was using React. Being able to just use regular HTML is also nice. There are some gotchas, how it handles CSS is kinda weird, and docs beyond the basics are rough in places.
- zepearl 5y agoThank you! :)
- westoncb 5y agoJust fyi, there is no need to use Redux just because you're using React. If it's a pretty simple case, you can use the built in `useReducer`[0]. Or if you want something that'll scale but that's much more lightweight than Redux, I'd recommend Zustand[1]. [0] https://reactjs.org/docs/hooks-reference.html#usereducer https://reactjs.org/docs/hooks-reference.html#usereducer [1] https://github.com/pmndrs/zustand https://github.com/pmndrs/zustand
- lIIIllllIIII 5y agoZustand looks so nice. I wanted to create my own state management library just for fun and spent a while brainstorming it and then ran into Zustand which basically does exactly what I wanted (but has presumably been developed by people who know what they're doing_
- girvo 5y agoAmen. We've entirely just used `useReducer` in combo with `useContext` where needed, and its been brilliant (this is a 100k LOC React app)
- KindAndFriendly 5y agoPros: - Very easy to learn. If you know TS/JS+HTML, there are ~ a handful new syntax expressions to learn, but otherwise you're good to go. - Easy to integrate an external CSS framework such as bootstrap - Built-int TS support. Being able to use types in your frontend code is delightful. Cons: - The generated output puts the vast majority of the content in the JS files (vs having a least some skeleton or so in HTML).
- zepearl 5y ago> Cons: - The generated output puts the vast majority of the content in the JS files (vs having a least some skeleton or so in HTML) Got it - thank you :)
- rawoke083600 5y agoI hope this doesn't come off as bragging or rude, but knowing nothing about you and a quite a bit about svelte.. Im going to guess, you could get to a very useable level with svelte in an afternoon or good weekend. LogRocket also has decent tutorials on Svelte. It's an extremely simple framework, relative to other js-frameworks like react or angular (not saying they better or worse). Reminds me a bit of Golang, you can get up and running in a day ! Bottom line: Definitely dive into svelte, i cant image doing js any other way these days. EDIT: Definitely start with svelte instead of sveltekit (different animal) YMMV :)
- pevey 5y agoI'm not the OP, but I find working with SvelteKit to be an extremely positive experience. It has completely re-sparked my love of programming. For the older people here on HN, maybe you can relate to this: I remember back in the late 90s when the LAMP stack first became a thing. We can poopoo it now, but it's really easy to underestimate the effect that stack had on soooo many developers. Going from static HTML to a relatively easy, accessible, and CHEAP way for any poor developer/college student like myself to generate dynamic content felt nothing short of magical. Suddenly it was possible to create just about anything you could imagine. There have been many improvements on ways to build web apps since those days, but I have never had that feeling of pure magic since. Until SvelteKit. It is a leap forward, IMO. The framework clicks for me, front end code, server side code, all in the same app, and in a way that from my view could not be easier to understand. It for me is that next leap forward.
- zepearl 5y agoGreat to hear, thanks a lot for your feedback :)