Live data from Hacker News

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

github.com

141–150 of 253 posts

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

#141
post #96
post #55

Earlier quoted context omitted.

I feel like I'm shilling a bit for React over here, but they are nearing two years without major breaking changes, and has been the de facto framework to go to for quite a while now.

React is the major breaking change.

Well, I mean, sure; if you're using something now, keep using that. I was mostly responding to the use case of coming to front-end after a year of not doing that. If you're going to "relearn everything", consider React; then that'll hopefully be the last time in the foreseeable future that you'll have to do that.

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

#142
Before you lament this move (and it's similarity to hooks/increase in complexity for questionable gain), check out John Lindquist's talk on Proxies:

https://www.youtube.com/watch?v=95haj8RqR5o

This is what Vue 3 is using -- Proxy support enables really easy and natively supported observables (as well as enabling a bunch of other crazy stuff), and it's actually pretty impressive.

I think the reactivity system is Vue's biggest wart -- I've been surprised by it way more than I would expect. I strongly dislike the complexity react seems to encourage, I'm not a fan of hooks, but I am coming around to seeing this as a way that Vue gets closer to KnockoutJS -- not as a way that it gets closer to react. Knockout had the simplest reactivity model you could ask for -- make an observable object and you're done -- it's observable, no surprises, very predictable interactions/behavior. I'm choosing to think of this as Vue going in this direction, although by more complicated means (Proxy vs a simple souped up observable wrapper).

That said, at this point I feel it's up to Vue to bungle my high opinion of the project -- they made it this far by being the simplest component frontend library with the best features, and the day they stop being that I'll be moving on. Already warming up to MithrilJS in my own projects, it's wonderfully minimal, performant, and light.

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

#143
post #78
post #46

Earlier quoted context omitted.

> 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.

Im still om angularjs. Cant bother to learn new frameworks every other month. Also using Angularjs in recent projects i never ever thought I was hobbled. Angularjs,jquery,vue - doesnt matter which tool one use. If you know any of these at advanced level you can create anything

Absolutely; I was a very satisfied user of Angular.js, and if you have a project in it currently, I'm sure it works just fine. But you're also missing out on a whole lot if you're restricted to their now-clumsy module system, their now-clumsy unit testing setup, their custom syntax with no editor support, its limited ability to work with type checking...

All those are fine not to have for an existing project, but they're what make people choose other frameworks (such as Angular 2+) for new projects. Angular.js wouldn't have been as big as regular Angular is today if they'd have kept focusing on that - let alone as big as React.

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

#144
post #78
post #46

Earlier quoted context omitted.

> 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.

Im still om angularjs. Cant bother to learn new frameworks every other month. Also using Angularjs in recent projects i never ever thought I was hobbled. Angularjs,jquery,vue - doesnt matter which tool one use. If you know any of these at advanced level you can create anything

The initial release was 8 years ago. Surely, you've had at least an ounce of curiosity about how the front-end ecosystem has changed since then? Even if you didn't adopt it, just to maybe poke around and look at what React, Vue, et. al. are up to?

It's not be dismissive of what you currently do. But perhaps you might see new efficiencies that allow you to do more with less, with these newer solutions.

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

#145
post #134
post #59

Earlier quoted context omitted.

What about books, talks, blog posts, SO answers, etc? Is everyone going to rewrite all React literature with hooks?

No rewriting needed. Hooks are just another way to do what was already possible in a more well-defined way. All the content written is still applicable. Now there is just a new way to do things too. The developers and documentation even advises against rewriting old components with hooks unless you need to.

> All the content written is still applicable.

Technically yes, but what if someone only uses hooks and has never used classes?

And, viceversa, since there is now a lot of people moving to hooks and producing React literature for hooks what if you only have used classes?

So now, to be able to read all the React literature one has to understand both methodologies.

> The developers and documentation even advises against rewriting old components with hooks unless you need to.

It doesn't matter. A big chunk of the JS community is hype-based.

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

#146
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..

Staying static just gives space to complacent, politics playing technology "elders".

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

#147

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.

> the direction they were going with hooks I'd be really interested in your thoughts on this. What about hooks don't you like so much that it made you abandon React?

Hooks brought me back to react. Everyone is different I guess.

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

#148

Earlier quoted context omitted.

I just left frontend, and I’m the maintainer for express-vue. Vue is great in its current iteration. But the whole JS ecosystem is just horrible right now. Looking at these changes, it’s not for the better.

I'm almost done with it as well. I can actually handle the churn and the random rewrites, a lot of them have been marked improvements, that doesn't bother me. What bothers me is when things change in ways that make them more complex than they were before, which also happens constantly. Not only that but I'm sick and tired of tool developers pandering to noobs. Nobody should ever be learning to use a library like Reac…

I'm trying to focus on the good parts of it, like: at least our jobs are safe.

Anyway do you have a minute to talk about our lord and saviour Rich Harris?

https://svelte.dev/

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

#149
post #55
post #4

I haven't done front end work for about one year. Looks like I'll be re-learning everything at some point, because this looks like a fairly major change. I'd strongly prefer backwards compatibility over a breaking change.

I feel like I'm shilling a bit for React over here, but they are nearing two years without major breaking changes, and has been the de facto framework to go to for quite a while now.

It seems inevitable that hooks will be the only API 3 years from now though, and its already the case that all the new literature and examples are only going to teach hooks. Vue might maintain compatibility just as long but they've totally hosed their messaging on this judging from all the comments in this thread.

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

#150
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..

How do people get over the issue of Evan You being the only code-writing contributor to Vue?

[deleted]
Post reply on HN