Live data from Hacker News

VueJS turns 10 years old

twitter.com

81–90 of 97 posts

Re: VueJS turns 10 years old

#81

I started using VueJS when I got thrown off the deprecation treadmill by Angular. Regardless of whether something is a hobby project that you want to only touch a couple times a year or a big project with dozens of developers, having your platform deprecated under your feet and being forced to do migration work sucks. Vue is now on version 3 within 10 years. That means anyone who relied on v1 has had their work churn…

As someone who started using Vue before 1.0, I find that characterization unfair. The overall API didn't change much from 1 to 2. 3 was initially going to be a big change, but after a lot of community resistance, they decided to make the reworked API entirely optional so people wouldn't be forced to make changes. AFAIK this is still the case and the classic variant (Options API) is still fully supported.

They did drop class components though which I had heavily used for both professional and personal projects. I still haven’t gone through the process of upgrading one of those but I’ve written a new project in vue 3 with the composition API and I like it overall I just hate that I have to switch from class components

Re: VueJS turns 10 years old

#82

I started using VueJS when I got thrown off the deprecation treadmill by Angular. Regardless of whether something is a hobby project that you want to only touch a couple times a year or a big project with dozens of developers, having your platform deprecated under your feet and being forced to do migration work sucks. Vue is now on version 3 within 10 years. That means anyone who relied on v1 has had their work churn…

We have a 100kloc codebase and migrated 2->3 + replaced our whole build stack (webpack -> vite) with a few dev days of effort (mostly on SSR stuff). It hasn't (at least not negatively) our general velocity at all. A totally different thing than moving from Angular 1 -> 2 for example.

I’d love to hear if anyone has done this migrating from vue 2 with class components. There doesn’t seem to be as nice of an upgrade path from what I can tell.

Re: VueJS turns 10 years old

#83

Earlier quoted context omitted.

Template, script, and style are all valid tags.

Sure but that is as helpful as saying a Word document (.docx) is a valid ZIP file. The tags in Vue files are merely containers of the actually interesting stuff.

What matters for most (all?) tools is that the file is a valid HTML syntax. Most (all?) tools don’t care if the document it self is valid HTML. I don’t think I’ve used a single developer tool which stops working if I remove the tag, nest elements or even insert a self closing tag.

Re: VueJS turns 10 years old

#85
post #67

Earlier quoted context omitted.

> A Vue SFC is syntactically compatible with HTML. https://vuejs.org/api/sfc-spec.html

No, Vue’s template attributes are not valid html

Vue uses @:[]. in their attributes and these are valid HTML attribute syntax. HTML attribute syntax only disallows SPACE"'>/= and some specific code points. Everything else is valid syntax.

https://vuejs.org/guide/essentials/template-syntax.html

https://html.spec.whatwg.org/#attributes-2

Re: VueJS turns 10 years old

#86

We have a large legacy PHP code base originally using "xajax" in many places for asynchronous parts of the UI. We've pretty much got somewhat of our own "framework" and any sort of re-write is absolutely out of the question. We have been slowing replacing xajax with VueJS via a script tag and it's been working great for us as a modern / supported alternative to xajax . There are certain VueJS niceties we can't take a…

Similar story here, we have a fairly large code base which has been continually evolved since year ~2000, with our own legacy "framework" for much of the server-side structure. Back then the forms used to reload the whole page, keeping user input and adding error messages (fun times!), then some kind of AJAX was added, where the server would send actual JS back to the client for execution. Some older pages still use jQuery.

A couple of years ago we needed to choose a way forward for new front-end dev, and we chose Vue just as Vue 3 was maturing. I didn't know much about reactive frameworks back then, so it was a bit of a hunch, but I'm very happy with how Vue3 has worked so far.

We did however do the effort of adding a build step. The site is basically multi-page, with small SPAs sitting at their own URLs for individual jobs. So we wrote a Rollup config to bundle each of the mini-SPAs into its own file, and modified the framework to add a way to configure "this page wants Vue3 and this is the path to its bundled JS". We load the main Vue script as a tag of its own, instead of adding it to all the bundles, for better caching. But as far as I can tell, in this way we can use all the Vue3 niceties, including Single-File Components.

Re: VueJS turns 10 years old

#87

Earlier quoted context omitted.

Sure but that is as helpful as saying a Word document (.docx) is a valid ZIP file. The tags in Vue files are merely containers of the actually interesting stuff.

What matters for most (all?) tools is that the file is a valid HTML syntax. Most (all?) tools don’t care if the document it self is valid HTML. I don’t think I’ve used a single developer tool which stops working if I remove the tag, nest elements or even insert a self closing tag.

[deleted]

Re: VueJS turns 10 years old

#88
post #67

Earlier quoted context omitted.

> A Vue SFC is syntactically compatible with HTML. https://vuejs.org/api/sfc-spec.html

No, Vue’s template attributes are not valid html

This is not the point, the point is if they are valid JavaScript or TypeScript.

Re: VueJS turns 10 years old

#89

This is an amazing project, it tells yet another story how one guy can start a project ended up challenging big companies like Google(Angular) and Meta(React). While React is adding all those complexity by SSR and server component etc these days, Vuejs separates them wisely, if you need just the original SPA, use vuejs as-is, if you want SSR, add Nuxt. I am moving back from React to Vuejs after realizing how heavily…

I build React apps without SSR all the time. What has changed in React besides optional support for it?

CRA is officially not supported and the official react documentations do not mention creating spa with Vite. They mention using next or remix.

Re: VueJS turns 10 years old

#90
post #51

I still don't understand why they had to introduce a proprietary file format. It means that, instead of being able to rely on existing tools for type checking & proper IDE support (like React does), you need custom tools for that custom file format. Unfortunately, developing those takes time – apparently more than 10 years: To this day (I set up a new Vue project just a few days ago) there are countless bugs in vue-t…

Does anyone know of a good open source syntax highlighting library for Vue SFC? That’s my biggest issue with the file format (I maintain a code review tool)

Shiki (https://shiki.style) might be good enough for your usecase, use the latest beta versions as it's the new fresh esm rewrite.
Post reply on HN