Live data from Hacker News

Vue 3.2

blog.vuejs.org

61–70 of 153 posts

Re: Vue 3.2

#61
post #3

What's advantage of VueJS over Svelte ?

Apart from much larger community, Vue can be used without any compilation step. Import from CDN, define components through DOM and mount the app onto a specific div.

I know about real world projects that use Vue as a progressive enhancement on an existing PHP site. A weather card is, for example, being managed by Vue with it's reactivity engine.

Re: Vue 3.2

#62

Earlier quoted context omitted.

I recently found Pinia[1] as replacement for vuex. - full typing - real life functions - vue dev plugin support in store section - mutations don't exist as separate idea - also has api, so i wrote little plugin for state synchronization with local storage. *Typography fix 1. https://pinia.esm.dev/

Wow. That's exactly what I thought Vuex would look like after after the Vue 3 release. Definitely going to use it for my future project.

Just know what you're getting into, this is a new rather unknown framework with much fewer users and resources than Vue with VueX.

Re: Vue 3.2

#63

I think my favourite thing about Vue 3 and the composition API is that VueX is essentially obsolete - you can manage your global state by calling real life functions. This means instead of doing `dispatch("action")` you just call `action()`. When using Typescript this is a godsend, as the action functions keep all of their type information.

I'm the other way, as in the composition API has not clicked yet for me.

I read the doc and it makes sense but once in my project, I fail to see why I would use it, and yes I use vuex.

I probably need to make a Vue3 project from scratch without vuex to get it.

Re: Vue 3.2

#64
post #56
post #24

Earlier quoted context omitted.

When I am just yet another dev in the team, I use whatever the FE team decided upon, however on my own projects I use Web Components with lithtml. The browser underlying stack is always going to be there regardless of what is fashionable to wrap around it.

That’s not necessarily a belief that holds true universally. Plenty of developers have found that React and JSX are two technologies that have beautifully matured outside of their initial home in the web browser ecosystem. To use your phrasing, React and JSX are always going to be there regardless of what is fashionable for them to be wrapped around.

If you mean React Native, many of those devs are now adopting Flutter fashion, at least from the iOS and Android corners of the Internet I happen to move around.

Cordova => React Native => Flutter => who knows

Re: Vue 3.2

#65

Anyone moved from React to Vue. I've been reading the Vue docs and I like some things about it but the compositional model seems a bit more confusing compared to React. Also, I think I do prefer working with JSX versus using html templates. I prefer that close coupling of JS logic and JSX presentation. The most appealing thing about Vue is that it seems to be more of a framework, maybe somewhere in the middle between…

I have a small toy project (essentially CRUD for images + tags + descriptions) that has a React frontend, mostly old class-style components. Having rewritten this frontend using Vue 3, my impression is that Vue 3 with its Composition API is just a different flavor of React with function-style components and hooks.

Re: Vue 3.2

#66

Anyone moved from React to Vue. I've been reading the Vue docs and I like some things about it but the compositional model seems a bit more confusing compared to React. Also, I think I do prefer working with JSX versus using html templates. I prefer that close coupling of JS logic and JSX presentation. The most appealing thing about Vue is that it seems to be more of a framework, maybe somewhere in the middle between…

We moved from Vue to React because it has much better static typing support. Properties are native Typescript values and templates are TSX which gives you proper Typescript type checking and also full IDE support (autocomplete, go to definition, etc.). Also Vue's automatic reactivity system is fine for small websites but for large apps it turns into an impossible to follow spaghetti nightmare.

Was that vue2 or vue3? I believe vue3/composition API made some improvements in both of these areas.

Re: Vue 3.2

#67

We've been pretty happy with Vue 2.6 and haven't had the motivation to take the leap. I did try it and even though it's advertised as somewhat backward compatible it did break lots of things, which was totally expected and it's a major release. Also we couldn't figure out a lot of things, like how can I access the $children like before, why does everything show Object proxy in console, etc. Posting on SO and forums a…

Did you try to migrate with Vue 3.1 and it's compatibility layer?

It helped me a lot.

Re: Vue 3.2

#68

I really wonder if all developers that really like jsx + inline grapql aren't old school php4 developers that were writing php logic and sql queries in the view itself.

those were the days! I was really productive in that mode, although the quality of output was 1/10 at best. Buggy, insecure, etc. Don't even talk about maintainability! But, but! You got it done real fast and most of the time for some random website that doesnt handle money, who cares?

Re: Vue 3.2

#69

Anyone moved from React to Vue. I've been reading the Vue docs and I like some things about it but the compositional model seems a bit more confusing compared to React. Also, I think I do prefer working with JSX versus using html templates. I prefer that close coupling of JS logic and JSX presentation. The most appealing thing about Vue is that it seems to be more of a framework, maybe somewhere in the middle between…

I've used both extensively and what makes me lean towards Vue on new projects is the reactivity system. It seems that with React you always have to wrestle with it to not do too many re-renders, but Vue is more likely to update only the parts of the dom that need updating out of the box. With composition API and Vue 3 bringing typescript support and hooks to me it's a no brainer to choose Vue. One other thing is that…

I agree. The reactivity system is definitely less verbose in Vue compare to React. And when you start working with things like Redux it gets very layered and complex very fast.

Re: Vue 3.2

#70
post #54

Anyone moved from React to Vue. I've been reading the Vue docs and I like some things about it but the compositional model seems a bit more confusing compared to React. Also, I think I do prefer working with JSX versus using html templates. I prefer that close coupling of JS logic and JSX presentation. The most appealing thing about Vue is that it seems to be more of a framework, maybe somewhere in the middle between…

What about security and upgrading? I've heard there is some pain upgrading Vue, but there is definitely pain when upgrading React. At the moment one of our previous React projects "npm install" gives 4000 security issues.

For me, upgrading cost was almost zero except 16 but it was clearly worth it.. I think you chose an obsolete project, which could happen to any lib.
Post reply on HN