Live data from Hacker News

Vue RFC: Expose logic-related component options via function-based APIs instead

github.com

41–50 of 253 posts

Re: Vue RFC: Expose logic-related component options via function-based APIs instead

#41
post #21

@Vue team if anyone should read this: I'd recommend to rename vue in the process (for example vueNG or whatever) in order to reduce the amount of false/outdated information when searching for a topic.

Yes, that's what the React team should have done when they implemented hooks.

Well, with React you can "opt in" when searching by simply adding "hooks" to the search term. Such wasn't possible with Angular back then

Re: Vue RFC: Expose logic-related component options via function-based APIs instead

#43
post #27
post #16

I might be totally and completely wrong, but changing everything does not help anyone except scratch the itch of the framework's designers. I'm pretty sure this is all with the best intentions, but this would be a disaster similar to how Angular suddenly changed everything . Not against change, but the API is fine. Just iterate and evolve it. disclaimer: Big fan of Vue, early user and conference attender..

The page mentions providing a compatibility build: > “The proposed APIs are all new additions and can theoretically be introduced in a completely backwards compatible way.” One thing they want to avoid is the whole Python 2 vs 3 distinction that went on forever. I’m not entirely sure these differences are that significant but having to merge in all of the data/computed/watch etc options into a single setup() function…

>the whole Python 2 vs 3 distinction

That was overplayed in my opinion by Python 3.2 or so a large percentage of Python 2 code could be made Python 3 code with the addition of: from __future__ import print_function at the top of the file (provided your libraries also went to 3 that is) most people didn't use any of the stuff that was removed.

Re: Vue RFC: Expose logic-related component options via function-based APIs instead

#45
post #22

I switched from React to Vue because I didn't like the direction they were going with hooks. Now it looks like Vue is heavily borrowing from the same approach. Slightly upset about that but I guess I'll have to learn the new style. Maybe it will be better in the long run.

You could look into other options like Svelte.

Or just go with hooks. Obviously there are quite a few pros and cons but for us the reduction in boilerplate led to a net increase in cognitive understandability of our code base so to say.

Re: Vue RFC: Expose logic-related component options via function-based APIs instead

#46
post #16

I might be totally and completely wrong, but changing everything does not help anyone except scratch the itch of the framework's designers. I'm pretty sure this is all with the best intentions, but this would be a disaster similar to how Angular suddenly changed everything . Not against change, but the API is fine. Just iterate and evolve it. disclaimer: Big fan of Vue, early user and conference attender..

> this would be a disaster similar to how Angular suddenly changed everything.

To be fair to Angular, if they'd stuck with what they had, it'd have faded into obscurity far more than the current version has. Angular.js was great for its time, but lost most of its advantages as the web caught up, and what used to be its advantages started to become kludges.

Re: Vue RFC: Expose logic-related component options via function-based APIs instead

#47
Well that's enough to reinforce my switch to https://svelte.dev

I want a JS framework simple enough that even hobbyist devs can understand in an afternoon.

React syntax is an overly complicated mess; like reactivity forcing itself onto HTML.

Current Vue syntax is neat, simple and clear; like HTML with added reactivity.

Re: Vue RFC: Expose logic-related component options via function-based APIs instead

#49

Well that's enough to reinforce my switch to https://svelte.dev I want a JS framework simple enough that even hobbyist devs can understand in an afternoon. React syntax is an overly complicated mess; like reactivity forcing itself onto HTML. Current Vue syntax is neat, simple and clear; like HTML with added reactivity.

but isn't it likely that svelte will undergo the same scope creep eventually?

Re: Vue RFC: Expose logic-related component options via function-based APIs instead

#50
It's amazing to me that after so many years of being the leading framework due to being the first to introduce a new paradigm (the virtual DOM), React is still "the framework to follow", i.e. again being the first to come up with an innovation (hooks) that spreads like wildfire. And even more amazing that they managed to do so in a backwards-compatible way.

(And also: with not that much pressure to adopt it. Having a "Standard" and a "Compatibility" build does result in that pressure.)

Post reply on HN