DEV Community

Discussion on: Vue's Darkest Day

Collapse
 
echoes2099 profile image
echoes2099

Dude, those are React hooks. LOLz

I find it funny that Vue stays relevant by copying what other frameworks do. Every time.

On the other hand, Vue just validated React's new approach.

Collapse
 
danielelkington profile image
Daniel Elkington

Agree that React Hooks are a great idea, and the concept (like for example a Virtual DOM) is worth adopting in other frameworks. I think Vue's version is even better than React Hooks - see this comparison. Also see this comment.

Collapse
 
drcmda profile image
Paul Henschel • Edited

Hm, these points do not really ring for me. The thing that made hooks so neat is that you can compose them. I know you can do this here, too, but i have trouble understanding how this would go. In React there's a call order, which i don't see as a negative despite the memoization, imo it helps to establish linear intent. Also to me it seems thinking in lifecycles (mount/unmount) isn't ideal, too. With hooks you're dealing with what are essentially effects.

Here's an example, i wonder how something like this would look in Vue: twitter.com/dan_abramov/status/109... In that example you see how they're composed in a linear order, one feeding the other. Items go into a shuffle, then together with columns and width go into the grid, the grid goes into a transform. If these were all observables that just happen to be driven by some one-shot hooks, would you be able to glance over it like that and see the connection?

I'm honestly curious, overall i must say i like the direction Vue is now going.

Thread Thread
 
linusborg profile image
Thorsten Lünborg

I've tried to flesh out the Vue version here:

gist.github.com/LinusBorg/f4378944...

Make sure to read the README. I'm open to questions :)

Thread Thread
 
danielelkington profile image
Daniel Elkington • Edited

@linusborg Nice! You may want to change the third link in the README from a duplicate CodeSandbox link to dev.to/drcmda/comment/c7l9 🙂

Thread Thread
 
linusborg profile image
Thorsten Lünborg

Oh, thanks. Will do

Thread Thread
 
drcmda profile image
Paul Henschel • Edited

Nice! That helps a lot to understand the differences.

Thread Thread
 
linusborg profile image
Thorsten Lünborg

No, there's no implementation available yet, the proposal is still being discussed and not adopted

Thread Thread
 
liximomo profile image
liximomo

There is an implementation github.com/liximomo/vue-function-api

Thread Thread
 
linusborg profile image
Thorsten Lünborg

Right, we came across this userland implementation as well in the meantime, it's pretty cool :)

Considering all that's going on right now I haven't had the time to try it, and can't say wether I will find time to use it for bringing this example to life in the coming days.

Collapse
 
ssimontis profile image
Scott Simontis

I think it's about time we all admit that Flux has gotten out of hand. It's way too much boilerplate code to write, keeping track of reducers becomes unmanageable, and you end up with lots of data thrown into global application state that has no business being there.

At least this is being planned and communicated...I love Elm but I wouldn't dare use it in Prod because of how immature the community is. Someone decided that something is inelegant and needs to be removed, but no replacement is offered. It's okay though, if you have problems go to the chat room and someone should be able to help you figure it out! Lolwhut? You deleted my shit!

I'm just sick of JS period right now. DLL hell is nothing compared to NPM hell. I'm sick of spending hours chasing down broken builds with no rational explanation and having 60MB of crap in node modules that could be the culprit.

I really just want to go back to pure JS and an event bus. Front end dev is incredibly frustrating now. None of the technologies I get excited about are stable enough to invest in and I have no idea who the target audience is for some of these tools...it sure isn't developers or users.

At times the ecosystem feels like a parody of itself where were so far up our asses we can't take a step back and reconsider where we are today.

And get off my lawn! 😂

Collapse
 
alangdm profile image
Alan Dávalos

Tbh, it's never been a better time to be a "vanilla" JS developer, you can write pretty complicated and full featured apps with zero dependencies a lot easier than before.

Sure, many of the browser apis are low level and just recently the old browsers have died enough to serve es-modules and don't lose that big of an audience but if you actually use those the dev experience is not that bad, it's actually an interesting exercise to see just how much you can do with zero building/transpiling/dependencies/polyfills

Collapse
 
pringels profile image
Peter Ringelmann

Funny how different perspectives can be. I for one love the current ecosystem and couldn't imagine having to go back to pure JS over an event bus :)

Thread Thread
 
emmymay profile image
EmmyMay

I don't want to ever build a website with vanilla Js again😂😂

Collapse
 
echoes2099 profile image
echoes2099

I'm sick of spending hours chasing down broken builds with no rational explanation

It's a lock file dude. And if you also want to lock down transitive dependency, use yarn's offline cache with a lock file.

I've had almost the exact opposite experience.

Vue - originally designed for newbies and designers. Copies patterns from other frameworks to entice developers to switch. You know where that's going---Angular 1 all over again! (Easy first few days but then you need a PhD to engineer complex apps).

React - seems to be designed for engineers. Features are added because they solve use cases (not because of "where the industry is going").

I've used Vue, Angular, and React and have always had a pleasant experience with React.

Would not use pure JS for a complex app---you end up reinventing the wheel before you know it!

Thread Thread
 
ssimontis profile image
Scott Simontis

In one instance, it was a brand new project I was starting where dependencies were breaking. I feel after a clean start no problems should have been possible. But I also had a manager standing behind me yelling so I couldn't focus at all, so perhaps it was something really trivial and I was just too irritated to focus.

I wish Elm was a little more mature, I am learning F# so I love Elm's syntax. It has a long way to go, however. I'd like to play around with PureScript and some of the other functional languages now that I have some time.