Hacker News new | ask | show | jobs
by karmakaze 1392 days ago
I'm a back-end dev. After trying a number of back-end framework renderers and React and Vue found that a single repo with both bankend and Vue client code with hotloading was a sweet spot for me.

I also prefer to make API based apps so might not be for everyone. I also like to change up my back-end language/framework for projects so this at least makes the front-end tech a constant.

1 comments

Thanks! Why Vue, compared to React? Is it simpler for someone not trying to do anything fancy on the front-end?
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