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 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/
Vue 3.2
91–100 of 153 posts
Re: Vue 3.2
#92Anyone 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 really liked The Vue class component pattern. Localized styles, logic, and markup, coherent state management built-in.
The tooling got more bloated in time, but it was still a breeze to work with.
I'm now trying to catch up with React again as industry tends to dictate—so far so good, but I liked the "pure"/Vue-flavoured HTML markup approach of Vue over JSX. It seemed to have all the benefits of JSX a la close-coupling in class components, but saves the wonky half-flavour of markup/logic—especially when it comes to working in TypeScript.
That said, maybe my tune will change after I spend more time in the React ecosystem again—especially trying to make more use of server-side rendering.
Re: Vue 3.2
#93I 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.
Re: Vue 3.2
#94Vue is hands down the worst frontend framework I've had the displeasure of working with. The authors are trying to hard to write something "different" that in the end they've only managed to create a bunch of incidental complexity that you constantly have to deal with because of their design decisions. And then they keep trying to "fix" these problems by adding new features and more complexity. Everything in Vue is m…
I've had the exact opposite experience to this, completely and utterly the other way around with React being over engineered and complex, with Vue being the tidier and faster to deal with. I get that React is the industry 'standard', but having worked with both for a while now, Vue is to me hands down better. Also with Vue, you have community driven direction, rather than FB. This is a big positive for me.
That was one of the top selling features for me as well. Not to disparage the large amount of work and thought and care that's gone into work on React, but when the tooling lies primarily in the hands of one company I get those old-fashioned Oracle vibes.
Re: Vue 3.2
#95Anyone 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 I don‘t like:
- jsx support is second class
- composition is wonky (better in3?)
- typescript is wonky (better in 3?)
- automatic reactivity is less predictable than the explicitness in React
- automatic reactivity on complex data structures is wonky
- no more than one component per file
- the "official" router is config based. I like the component composition of react-router
What I like
- way easier to learn for any previous web developer
- vuex. I think global state libs are overused but if you need one, it‘s nice and it‘s great that you don‘t have to glue it to the framework yourself
- significantly smaller and faster
- can realistically work without a bundler directly in any html page
Re: Vue 3.2
#96Earlier quoted context omitted.
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?
> Buggy, insecure, etc. Don't even talk about maintainability! > who cares? Some people want their whole website to work for all visitors, so they care about bugs. Some people want their website to stay online and not to be misused by spammers and co, even for non-commercial sites, so they care about security. Some people want their website to evolve for years, so they care about maintainability. Shipping junk code i…
Re: Vue 3.2
#97Anyone 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…
React is: always right, sometimes slow
Vue is: always fast, mostly right
I prefer fixing performance bottlenecks later over having any doubt about the correctness of my view or debugging why this one property only sometimes becomes reactive. But I can see how others would feel differently.
Re: Vue 3.2
#98Earlier quoted context omitted.
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?
> Buggy, insecure, etc. Don't even talk about maintainability! > who cares? Some people want their whole website to work for all visitors, so they care about bugs. Some people want their website to stay online and not to be misused by spammers and co, even for non-commercial sites, so they care about security. Some people want their website to evolve for years, so they care about maintainability. Shipping junk code i…
I may be exaggerating but, as always, engineering is all about trade-offs.
Re: Vue 3.2
#99Re: Vue 3.2
#100I've worked on projects that use Vue 2 HTML templates + TypeScript before and a big chunk of the bugs are clustered around where TypeScript is interacting with the HTML templates.