Vue 3 is now in RC
github.com
github.com
I think the Vue team are a really great example of how to maintain a widely adopted open source project whilst keeping almost the entire user base happy. Steady improvements with a focus on backwards compatibility, easy migration between versions and a lot of consulting with the community. The new composition API had a little backlash when it was proposed, but it seemed like the benefits were well communicated and the community came round. Personally I love all the changes in version 3 so far.
I'm hoping the new composition API will make adopting Vue an even easier choice for larger projects, I think the benefits are obvious. I admit I do have a slightly vested interest in increased adoption though.
Congrats to the Vue team on getting this to RC stage!
> Start by running the migration helper on a current project. We’ve carefully minified and compressed a senior Vue dev into a simple command line interface. Whenever they recognize an obsolete feature, they’ll let you know, offer suggestions, and provide links to more info.
Vue's docs are a masterclass in docs-writing, imho. Clear. Concise. Empathetic. Written for humans.
With this new API, my first impression is “just use React at this point”. I’m having serious trouble understanding why they’d make this change. Of course I may be biased working in React day to day, but... bleh, Vue used to be unique.
Tools and libraries are always influenced by what's going on in the ecosystem. New features and concepts in Tool A inspire something else in Tool B, etc.
The React team came up with something reasonably novel with the hooks API (but with its own set of prior art [0]). There are several aspects to hooks that folks have expressed concerns about, but overall adoption has been positive and rapid.
The Vue team looked at React hooks, saw something that seemed like it could be useful for Vue's API, but came up with their own spin on the idea that makes them better fit the Vue use cases and design philosophy.
I don't see any of this as a problem - sharing ideas and improving DX is a _good_ thing.
[0] https://reactjs.org/docs/hooks-faq.html#what-is-the-prior-ar...
"More Flexibility Requires More Discipline
Many users have pointed out that while the Composition API provides more flexibility in code organization, it also requires more discipline from the developer to "do it right". Some worry that the API will lead to spaghetti code in inexperienced hands. In other words, while the Composition API raises the upper bound of code quality, it also lowers the lower bound. We agree with that to a certain extent."
Vue 3 has committed several cardinal sins of software projects:
1) Splitting the API, allowing several different ways of doing the same thing. Call it "basic" and "advanced". Every developer thinks they're smart enough to use the advanced method, and egocentric devs will shame others to do it that way because it's "better" (this is already happening). This is a community killer.
2) Most orgs don't have the discipline required to keep code from turning into a mess if a library or API will let them. Time constraints, miscommunications, refactoring gone wrong, and general ignorance or outright stupidity always rears their ugly heads. If Vue 3 was a gun, it'd be a shotgun fired at your foot in an enclosed space.
3) Fad chasing. Emulating React hooks was a premature decision. Hooks are a hack (and it is a hack, without any question) to help some of React's more painful points. It's not a general solution. Trying to emulate that function-first way of doing things (fighting against JavaScript to do it) isn't something Vue needed to do, and just makes Vue seem like a React-clone instead of a project in its own right.
I personally prefer the older API since its more declarative, but I can see how the new API can help to keep reactivity logic in a single function, rather than across computed properties, watchers, etc. (not to mention the annoyance of having to remember what type each property should export -- function returning object? raw object? object with function fields?).
Should I learn Vue?
(Edit: Thanks for the reply -- to clarify, I'll be working on a web app.)
I use it professionally and due to my involvement with a Javascript meetup, I'm regularly exposed to Angular and React examples and I'm shocked at how convoluted they can be.
How do you rate each platform’s ability to get someone up to speed?
I reason I got to explore Angular, initially, was because of the following points, hammered around the internet in the myriad of "Angular Vs. React" articles.
1. Angular is a full framework, while React is just the front end library.
2. Eventually you will have to use state management libraries, Routing, etc in React. Angular provides it from the get go.
3. With React, you have an infinite number of choices of libraries for state, routing, etc. Hence, it can become confusing, while Angular is a full framework with preset libraries, and hence is more coherent.
However, In practicality, I experienced the following.
1. Angular is a full framework, implies, there is a lot more to learn. Now, don't get me wrong, when you complete on complex project in Angular and React, at the end of the project, if you count the hours of learning, it will probably be same for both. However, because React is paced out, it's easier to get started and make an MVP.
2. I absolutely hated the NgModule system in Angular. Maybe I am mistaken, but Angular purports to gather related code into Modules, which are not JS modules. The benefit touted is clean separation, better organization, easier to find code, etc. However, I found the Module system to be overly complicated and an additional cognitive overhead, to what is already a cognitive burden of developing in Typescript.
3. The infinite number of libraries, stack choices, etc argument for React does not actually hold much water.
(a) Redux / MobX are two libraries that are popular and complete enough to meet the requirements of 99% of the projects out there.
(b) React-Router is usually the router choice.
(c) Axios for REST communication.
Now, there are other libraries, which may be better. However, if you stick to the stack above, you have just as many tutorials, videos, articles, etc to help you with development.
For all these reasons, I found React to be a better alternative.
Note that the concepts behind these stacks is identical. The implementations are slightly different. However, if you are sound conceptually, these frameworks become a minuscule part of your app. Your focus would squarely be on app architecture than framework stuff.
In addition to having better 1st party coherence, Vue has fewer footguns than React.
However it's a different paradigm than HTML/PHP templates with some Jquery click handlers thrown in.
I understand there are a lot of data points to consider. In terms of usage, based on our metrics this is incorrect, but of course, that highly depends on your dataset that's why I'm curious.
As for my judgement of modern Angular as complex, there's a few things I'd like to point out:
- separation of CSS, JS, and templating into separate files. This makes it harder for the mind to keep everything in place rather than just scrolling
- defining routes in a global file but also in modules.
- providers, services, modules, etc
To be fair, Angular is so much more than React and Vue, which just parse templates and add some features. I feel like I'm not spouting a hot take, I feel like it's earned. If Angular wants to seem more approachable, the team has a way to go.
Generally, lots of the examples out there use very expressive APIs coming from RxJS. They could be very powerful, but at the same time may look convoluted to folks unfamiliar with the semantics.
I can recommend you checking out https://angular.io/start. We did a few iterations on the materials and tried to introduce the concepts from the framework gradually.
Something you could notice is that Angular encourages the best practices from the beginning, such as TypeScript, testability, etc. Based on my observations, this may make the learning journey a little steeper at first, but starting with (and learning) good practices is always worth it.
Either because of logistical limitations, or programming limitations, or throughput limitations, or user load limitations, or even if the program you want to build is beyond what Vue was designed for.
Say, if I want to build a large website like a Salesforce web application, or a warehouse fulfillment and inventory management system, or something of this nature. Where it has a lot of web pages, and different processes to handle different calculations, and what not. And it ties into some back end database of course.
Can Vue handle such a level of complexity? Or is Vue better suited to handling smaller sized apps, with smaller quantities of users?
The GPT-3 code generation demo (https://twitter.com/sharifshameem/status/1284095222939451393) cannot be applied in practice (for now), but there's nothing stopping anyone from making those GPT-3 demos generate Vue code instead of React.
Thanks :)
Should just be a matter of handling another output format.
Do you folks use Vue with npm?