Hacker News new | past | comments | ask | show | jobs | submit login
Introducing Svelte, and Comparing Svelte with React and Vue (joshcollinsworth.com)
14 points by hu3 on Jan 14, 2022 | hide | past | favorite | 3 comments



I am also just playing around with Svelte. I finally figured out a good way to do CSS - CSS variables in global CCS file, set '*' defaults based on these variables, change variables on parent of called component, or directly pass to component (rarely needed). That's cool, as I can avoid that ugly :global syntax.

I also figured out a working approach how to trigger state updates. Just chain store.update()'s into each other. Dunno if that is the best way, but it fucking triggers reactivity, and I do not have to think about it anymore. Now my fingers can take over.

Nice also, to have preprocessors like pug and stylus available. My folding editor doesn't support multiple types of comments in a file. With these processors, I can use '//' everywhere. And who likes to write raw HTML anyway.


P.S., also practical to have 'watch: {clearScreen: true}' in rollup.config.js.


Svelte is really interesting to me. We use React at my work though and I don't think that's gonna change anytime soon.

I might want to do a few of my personal projects in Svelte just to try it out, it seems really simple to use which is a breath of fresh air compared to React. I really hope it starts growing out more so we can get a good community behind, in the end a big part of these frameworks is the work that people put to make all kinds of things much easier like forms and animations and whatnot.

Ultimately I'd like to say that a lot of uses could still simply be solved through proper css/html and there's never going to be something more performant than that, you don't need a front end javascript framework for a personal blog.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: