Hacker News new | ask | show | jobs
by retep_kram 1385 days ago
Thanks! Why Vue, compared to React? Is it simpler for someone not trying to do anything fancy on the front-end?
1 comments

Let me see if I can find a demo repo. Actually, I have hackerer.news[0] done in Vue. Since this uses HN back end, only has Vue client code in a single view:

https://gitlab.com/karmakaze/hackerer-news/-/blob/master/src...

I like having the single file component .vue file that has the template, class/methods, and styles.

With React devs often quickly turn jsx into a code-y mess because it's default form is code that returns markup. With Vue the template part is markup that can call code. This makes me manage things with clearer separation with less of a slippery slope of lots of code with interspersed markup returned here and there. The property and event binding is also dead simple.

Edit: note that the use of vue-stash in main.ts is an alternative to more popular data sync methods.

[0] https://hackerer.news/ [1] https://gitlab.com/karmakaze/hackerer-news