r/webdev • • Sep 26 '18

The Solo JavaScript Developer Challenging Google and Facebook

https://www.wired.com/story/the-solo-javascript-developer-challenging-google-facebook/
65 Upvotes

23 comments sorted by

View all comments

38

u/koprulu_sector Sep 26 '18

My perspective is that Vue seems to be what developers who prefer object oriented programming choose, while React is more popular for those that are open to exploring a functional approach. Neither is better or worse - it’s preference.

Personally, I think Vue’s fast rise and gaining popularity are almost a backlash resulting from developers wanting/needing a new framework and not wanting to go the functional route, or relearn MVC as just V.

-2

u/Kaiser214 Sep 26 '18

I would argue that React is the more Object Oriented approach because the components themselves are defined as ES6 classes. You craft true constructor functions that handle any setup/teardown in addition to lifecycle methods.

Vue is more about learning patterns. You craft Vue components by always placing any properties within the "data" or "props" key and the methods within the "methods" key. You don't implement your own constructor methods and instead rely solely on lifecycle hooks.

It's just about personal preference and current skill level in Javascript. Those coming from jQuery might find Vue easier to learn. React has a bit higher learning curve.

3

u/jakethepuppo Sep 26 '18

> Vue is more about learning patterns.

Programming is about learning patterns...and how is making a constructor meaningful in any way?

Also, since when do you not rely on lifecycle hook in React? A constructor is basically a lifecycle hook anyways...and it's even mentioned as such in the React documentation.

-1

u/Kaiser214 Sep 26 '18

Programming is about learning patterns...and how is making a constructor meaningful in any way?

LMAO... Um... it's pretty important in OOP to handle the information passed when instantiating an object. With and without javascript, this is pretty basic stuff. Tis why I stated that React could be viewed as the more Object Oriented approach. No doubt that they both utilize it.

Also, since when do you not rely on lifecycle hook in React?

You do rely on them. Thanks for playing.