Live data from Hacker News

VueJS turns 10 years old

twitter.com

71–80 of 97 posts

Re: VueJS turns 10 years old

#71

To me Vue is just a maintained version of angular 1

It got so much right from the start, looking at Angular 2 just made me throw up my hands.

But saying "just" is unfair to Vue, it's a big upgrade thanks to the internal mechanics as it solved a lot of brittle and error prone ceremony associated with writing Angular that just went away with the same elegant style of templating.

Re: VueJS turns 10 years old

#72

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…

Couldn't agree more. We've been having good luck working with TSX-templated Vue components (using "render functions"[1]) after getting fed up with gaps in VTI back in the day – most of https://radiopaper.com is built in this way and we're closing in on it all being so. We haven't run into any issues with Vue's (alleged) lack of ability to optimize TSX templates in certain ways as opposed to traditional Vue templates – maybe comes down to the nature of our use cases – but our view is that this trades off against many other benefits:

- File extensions are all .tsx, and thus work with bog-standard editor tooling and syntax highlighting

- We're more confident about typechecking in templates, because template code is 1 minor transformation away from raw typescript, and basic `tsc` has understood TSX well for years now. Up and down the component stack, it feels like we understand typings better without "gaps" at each template layer.

- Scoping of values in templates is easier to understand. Everything you write is what it says it is, it's just whatever's in the same scope as the template. There are no transformations, no omissions of various words, no magic.

- It's easier to compose templates from small easy-to-understand parts in the same file, without fragmenting code across many small components. Not everything needs to live in a `` tag separate from your `` tag.

- When React folks have joined the team they've had no problem ramping up.

- By the way, in Vue TSX you just say "class" not "className" which is refreshing.

Feel free to email me at evan at radiopaper dot com if any of this interests you – we're currently working on expanding the team and looking for like-minded people interested in contributing.

[1] https://vuejs.org/guide/extras/render-function.html

Re: VueJS turns 10 years old

#73

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…

"Version 3 within 10 years" is, in this industry, glacial pace.

And also, the work required to do those upgrades has always been relatively minimal, with a backwards path for stuff you're not ready to convert yet, but real tangible benefits for the stuff you are. I still have a few projects that are a mix of Vue 2/3 - new stuff written in 3 because it's nicer, older components not rewritten yet because they haven't needed to be touched and just still work.

Re: VueJS turns 10 years old

#74

Earlier quoted context omitted.

Without more context can't comment on your upgrade process. But as others stated above, there's not much difference betweeb 2 and 3, except you do not get composition api on a v2 project, while you can use composables but can't go full composition api and have to stick to options api. Other than that most of v2 code would work on v3.

This isn't correct. I'm using the composition API on all my Vue 2 projects. It's even baked into 2.7. https://github.com/vuejs/composition-api

Yeah our path to upgrade is going component by component switching them to compositional style.

Re: VueJS turns 10 years old

#75

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.

Going through the same migration from nuxt 2 to nuxt 3. Can you share more details? Did you also move from vuex to pinia ? If so, how did you manage the API change (dispatch, commit) scattered through the codebase. I'd love to learn more

Re: VueJS turns 10 years old

#76

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…

From what I recall, most of the early development was funded due to Patreon, and if you looked at the list of donors, something like 75% of the money came from a few large companies.

Re: VueJS turns 10 years old

#77

Earlier quoted context omitted.

Vue files are absolutely not valid HTML.

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.

Re: VueJS turns 10 years old

#78

Earlier quoted context omitted.

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.

Going through the same migration from nuxt 2 to nuxt 3. Can you share more details? Did you also move from vuex to pinia ? If so, how did you manage the API change (dispatch, commit) scattered through the codebase. I'd love to learn more

We had a homegrown store lib that was very similar to pinia, so migration was basically minor renaming.

Like others have mentioned, the biggest fear was other libs we used. We are quite conservative with that though, so want a big deal.

Re: VueJS turns 10 years old

#79

Earlier quoted context omitted.

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.

We're about to need to do the same thing with similarly sized codebase. Would love to hear your story. Did you find any migration tooling to help? Would be happy to DM to chat as well. One of our issues is that we've used some component frameworks that also need to be migrated.

Basically, see other comments. We simply followed the migration guide. Very painless. We use few external libs, så that helped a lot. You can find me on LinkedIn with the same username as here for DM.

Re: VueJS turns 10 years old

#80
post #17

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…

> What's worse, type checking was largely an afterthought in the development of Vue I'm not sure what you mean. For Vue 3 it was a priority and extensive work went into exposing types that would make it easier for IDE tooling to integrate. Features like the `defineProps` macro are specifically designed to make TS development easier.

You're proving my point.

> For Vue 3 it was a priority

Right, for version 3. And type checking & IDE support still don't work glitch-free.

> Features like the `defineProps` macro are specifically designed to make TS development easier.

As you say, in more recent Vue versions, defineProps is a compiler macro, no longer something you `import […] from 'vue'`. So IDE developers had to put in effort to support it.

Post reply on HN